Ticket #17: emulator.py.patch
File emulator.py.patch, 974 bytes (added by morgs, 15 years ago) |
---|
-
.py
old new 16 16 17 17 import os 18 18 import sys 19 import random 19 20 import socket 20 21 import logging 21 22 from optparse import OptionParser … … 67 68 68 69 cmd = [ 'Xephyr' ] 69 70 cmd.append(':%d' % display) 70 cmd.append('-ac')71 71 72 72 if gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900: 73 73 cmd.append('-fullscreen') … … 81 81 cmd.append('-dpi') 82 82 cmd.append('%d' % dpi) 83 83 84 random.seed() 85 cmd2 = [ 'xauth' ] 86 cmd2.append('add') 87 cmd2.append(':%d' % display) 88 cmd2.append('.') 89 cmd2.append('%s' % hex(random.getrandbits(128))[2:-1]) 90 log.debug('Xauth command: %s', " ".join( cmd2 )) 91 gobject.spawn_async(cmd2, flags=gobject.SPAWN_SEARCH_PATH) 92 84 93 log.debug('Xephyr command: %s', " ".join( cmd )) 85 94 result = gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH) 86 95 pid = result[0]