diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-12 12:02:29 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-12 12:02:29 (GMT) |
commit | be806eb1918f7db90e661b5fcb4e260a0b1ba669 (patch) | |
tree | 09ca8d2341d5875c1623801516a5f32bf1626063 /shell/Emulator.py | |
parent | ca2b08f8b6fb1bc54a4e4f9cfc457f57cf958c7f (diff) |
More cleanups and some fixes
Diffstat (limited to 'shell/Emulator.py')
-rw-r--r-- | shell/Emulator.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/shell/Emulator.py b/shell/Emulator.py new file mode 100644 index 0000000..982fc21 --- /dev/null +++ b/shell/Emulator.py @@ -0,0 +1,27 @@ +import os + +from Process import Process + +class XephyrProcess(Process): + def __init__(self): + # FIXME How to pick a free display number? + self._display = 100 + cmd = 'Xephyr :%d -ac -screen 640x480' % (self._display) + Process.__init__(self, cmd) + + def get_name(self): + return 'Xephyr' + + def start(self): + Process.start(self) + os.environ['DISPLAY'] = ":%d" % (self._display) + +class Emulator: + """The OLPC emulator""" + + def __init__(self): + pass + + def start(self): + process = XephyrProcess() + process.start() |