Start implementing the panels.
This commit is contained in:
@@ -54,22 +54,6 @@ class XnestProcess(Process):
|
||||
Process.start(self)
|
||||
os.environ['DISPLAY'] = ":%d" % (self._display)
|
||||
|
||||
class DbusProcess(Process):
|
||||
def __init__(self):
|
||||
config = sugar.env.get_dbus_config()
|
||||
cmd = "dbus-daemon --print-address --config-file %s" % config
|
||||
Process.__init__(self, cmd)
|
||||
|
||||
def get_name(self):
|
||||
return 'Dbus'
|
||||
|
||||
def start(self):
|
||||
Process.start(self, True)
|
||||
dbus_file = os.fdopen(self._stdout)
|
||||
addr = dbus_file.readline().strip()
|
||||
dbus_file.close()
|
||||
os.environ["DBUS_SESSION_BUS_ADDRESS"] = addr
|
||||
|
||||
class Emulator:
|
||||
"""The OLPC emulator"""
|
||||
def start(self):
|
||||
@@ -84,6 +68,3 @@ class Emulator:
|
||||
print 'Cannot run the emulator. You need to install \
|
||||
Xephyr or Xnest.'
|
||||
sys.exit(0)
|
||||
|
||||
process = DbusProcess()
|
||||
process.start()
|
||||
|
||||
@@ -9,6 +9,22 @@ from ConsoleWindow import ConsoleWindow
|
||||
from session.Process import Process
|
||||
import sugar.env
|
||||
|
||||
class DbusProcess(Process):
|
||||
def __init__(self):
|
||||
config = sugar.env.get_dbus_config()
|
||||
cmd = "dbus-daemon --print-address --config-file %s" % config
|
||||
Process.__init__(self, cmd)
|
||||
|
||||
def get_name(self):
|
||||
return 'Dbus'
|
||||
|
||||
def start(self):
|
||||
Process.start(self, True)
|
||||
dbus_file = os.fdopen(self._stdout)
|
||||
addr = dbus_file.readline().strip()
|
||||
dbus_file.close()
|
||||
os.environ["DBUS_SESSION_BUS_ADDRESS"] = addr
|
||||
|
||||
class MatchboxProcess(Process):
|
||||
def __init__(self):
|
||||
kbd_config = os.path.join(sugar.env.get_data_dir(), 'kbdconfig')
|
||||
@@ -26,6 +42,9 @@ class Session:
|
||||
"""Takes care of running the shell and all the sugar processes"""
|
||||
def start(self):
|
||||
"""Start the session"""
|
||||
process = DbusProcess()
|
||||
process.start()
|
||||
|
||||
process = MatchboxProcess()
|
||||
process.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user