Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/Emulator.py
diff options
context:
space:
mode:
Diffstat (limited to 'shell/Emulator.py')
-rw-r--r--shell/Emulator.py27
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()