From bbf2c103c5c760c0de2c3e48f9ab5ce29f9a97d9 Mon Sep 17 00:00:00 2001 From: "wez@chromium.org" Date: Fri, 4 May 2012 04:13:33 +0000 Subject: 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 --- remoting/tools/me2me_virtual_host.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'remoting/tools') 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 -- cgit v1.1