Install service files for the presence service

This commit is contained in:
Marco Pesenti Gritti
2006-08-13 00:06:52 +02:00
parent e57f4da027
commit e2e5bc0000
7 changed files with 25 additions and 21 deletions
+7
View File
@@ -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 \
@@ -0,0 +1,4 @@
[D-BUS Service]
Name = org.laptop.Presence
Exec = @bindir@/sugar-presence-service
-19
View File
@@ -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()