summaryrefslogtreecommitdiffstats
path: root/remoting/tools
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 04:13:33 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 04:13:33 +0000
commitbbf2c103c5c760c0de2c3e48f9ab5ce29f9a97d9 (patch)
tree7322c6a5cc7cee87f04a4dbdefc0db94a947d6f6 /remoting/tools
parent5cccb8fa1ade2c2a45f540bf06e470a85c4ebe33 (diff)
downloadchromium_src-bbf2c103c5c760c0de2c3e48f9ab5ce29f9a97d9.zip
chromium_src-bbf2c103c5c760c0de2c3e48f9ab5ce29f9a97d9.tar.gz
chromium_src-bbf2c103c5c760c0de2c3e48f9ab5ce29f9a97d9.tar.bz2
Use setxkbmap to set virtual Me2Me to use "evdev" keycodes.
BUG=119013 Review URL: http://codereview.chromium.org/10356010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index f797648..b295824 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -282,6 +282,7 @@ class Desktop:
logging.info("Starting Xvfb on display :%d" % display);
screen_option = "%dx%dx24" % (self.width, self.height)
self.x_proc = subprocess.Popen(["Xvfb", ":%d" % display,
+ "-noreset",
"-auth", X_AUTH_FILE,
"-nolisten", "tcp",
"-screen", "0", screen_option
@@ -318,6 +319,18 @@ class Desktop:
else:
logging.info("Xvfb is active.")
+ # The remoting host expects the server to use "evdev" keycodes, but Xvfb
+ # starts configured to use the "base" ruleset, resulting in XKB configuring
+ # for "xfree86" keycodes, and screwing up some keys. See crbug.com/119013.
+ # Reconfigure the X server to use "evdev" keymap rules. The X server must
+ # be started with -noreset otherwise it'll reset as soon as the command
+ # completes, since there are no other X clients running yet.
+ proc = subprocess.Popen("setxkbmap -rules evdev", env=self.child_env,
+ shell=True)
+ pid, retcode = os.waitpid(proc.pid, 0)
+ if retcode != 0:
+ logging.error("Failed to set XKB to 'evdev'")
+
def launch_x_session(self):
# Start desktop session
# The /dev/null input redirection is necessary to prevent Xsession from