Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-12 22:06:52 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-12 22:06:52 (GMT)
commite2e5bc0000ab616f5de2d9270a0a4c0b98c220d3 (patch)
tree21b0431951551c0e0fd5f44df90d9896959434d5 /shell
parente57f4da027bfcf0d9427cf15ab1f78778b3000bd (diff)
Install service files for the presence service
Diffstat (limited to 'shell')
-rw-r--r--shell/PresenceService/Makefile.am7
-rw-r--r--shell/PresenceService/org.laptop.Presence.service.in4
-rw-r--r--shell/session/Session.py19
3 files changed, 11 insertions, 19 deletions
diff --git a/shell/PresenceService/Makefile.am b/shell/PresenceService/Makefile.am
index e3cced4..da37f89 100644
--- a/shell/PresenceService/Makefile.am
+++ b/shell/PresenceService/Makefile.am
@@ -1,3 +1,10 @@
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.laptop.Presence.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+$(service_DATA): $(service_in_files) Makefile
+ @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
+
sugardir = $(pkgdatadir)/shell/PresenceService
sugar_PYTHON = \
__init__.py \
diff --git a/shell/PresenceService/org.laptop.Presence.service.in b/shell/PresenceService/org.laptop.Presence.service.in
new file mode 100644
index 0000000..3739d9e
--- /dev/null
+++ b/shell/PresenceService/org.laptop.Presence.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name = org.laptop.Presence
+Exec = @bindir@/sugar-presence-service
+
diff --git a/shell/session/Session.py b/shell/session/Session.py
index de6b514..66a085f 100644
--- a/shell/session/Session.py
+++ b/shell/session/Session.py
@@ -44,22 +44,6 @@ class MatchboxProcess(Process):
def get_name(self):
return 'Matchbox'
-class PresenceServiceProcess(Process):
- def __init__(self):
- Process.__init__(self, "sugar-presence-service")
-
- def get_name(self):
- return "PresenceService"
-
- def start(self):
- Process.start(self)
- bus = dbus.Bus()
- ret = False
- # Wait for the presence service to start up
- while not ret:
- ret = dbus.dbus_bindings.bus_name_has_owner(bus._connection, PresenceService.DBUS_SERVICE)
- time.sleep(0.2)
-
class Session:
"""Takes care of running the shell and all the sugar processes"""
def __init__(self, registry):
@@ -76,9 +60,6 @@ class Session:
process = MatchboxProcess()
process.start()
- process = PresenceServiceProcess()
- process.start()
-
shell = Shell(self._registry)
shell.set_console(console)
shell.start()