[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [PVFB] Set keyboard layout of PVFB from configuration file.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169483223 0
# Node ID 200a9c6deeb3947f3c0e4727aa0074de6acfdb7e
# Parent  b1c03f19a4ef68ff4858e899578caad39ff669ac
[PVFB] Set keyboard layout of PVFB from configuration file.

For example:
keymap = "ja"

Default remains en-us.

Signed-off-by: Takanori Kasai <kasai.takanori@xxxxxxxxxxxxxx>
Signed-off-by: Tomohiro Takahashi <takatom@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Masami Watanabe <masami.watanabe@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/vfbif.py |    4 +++-
 tools/python/xen/xm/create.py         |    3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff -r b1c03f19a4ef -r 200a9c6deeb3 tools/python/xen/xend/server/vfbif.py
--- a/tools/python/xen/xend/server/vfbif.py     Mon Jan 22 16:26:00 2007 +0000
+++ b/tools/python/xen/xend/server/vfbif.py     Mon Jan 22 16:27:03 2007 +0000
@@ -14,7 +14,7 @@ def spawn_detached(path, args, env):
         os.waitpid(p, 0)
         
 CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused',
-                  'display', 'xauthority']
+                  'display', 'xauthority', 'keymap' ]
 
 class VfbifController(DevController):
     """Virtual frame buffer controller. Handles all vfb devices for a domain.
@@ -68,6 +68,8 @@ class VfbifController(DevController):
             vnclisten = config.get("vnclisten",
                                    
xen.xend.XendOptions.instance().get_vnclisten_address())
             args += [ "--listen", vnclisten ]
+            if config.has_key("keymap"):
+                args += ["-k", "%s" % config["keymap"]]
             spawn_detached(args[0], args + std_args, os.environ)
         elif t == "sdl":
             args = [xen.util.auxbin.pathTo("xen-sdlfb")]
diff -r b1c03f19a4ef -r 200a9c6deeb3 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Jan 22 16:26:00 2007 +0000
+++ b/tools/python/xen/xm/create.py     Mon Jan 22 16:27:03 2007 +0000
@@ -594,6 +594,9 @@ def configure_vfbs(config_devs, vals):
                           'xauthority', 'type', 'vncpasswd' ]:
                 err("configuration option %s unknown to vfbs" % k)
             config.append([k,v])
+        for n in iter(dir(vals)):
+            if n == "keymap":
+               config.append(['keymap',vals.keymap])
         if not d.has_key("display") and os.environ.has_key("DISPLAY"):
             config.append(["display", os.environ['DISPLAY']])
         if not d.has_key("xauthority"):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.