[X2go-dev] python-x2go questions when working on Ubuntu Sofware Center

Stéphane Graber stgraber at ubuntu.com
Sat May 28 22:16:34 CEST 2011


On Sat, 2011-05-28 at 13:03 +0200, Mike Gabriel wrote:
> Hi devs,
> 
> as you might have observed, Stephane and I are currently trying to get  
> xkbmap settings through to the server-side x2goagent (Python X2go on  
> the client-side).
> 
> The work is partially python-x2go specific, but also worth a change of  
> concept, as many X2go users have problems with keyboard settings.
> 
> Today I have set up a system with a patched x2gostartagent script. The  
> script abuses the not-used option $X2GO_KB_LAYOUT. If its value is set  
> to defkeymap. The x2goagent options file gets changed in this way  
> (patch for x2gostartagent at the end of this mail):
> 
>    o keyboard=defkeymap is added as option
>    o kbtype=pc105/defkeymap is used
>    o a keyboard file is placed into ~/.x2go/C-<session_id> on the X2go server
> 
> On Sa 28 Mai 2011 01:25:59 CEST Mike Gabriel wrote:
> 
> >> And I have a "keyboard" file in the NX session directory on the server
> >> containing:
> >> rules=evdev
> >> model=pc105
> >> layout=us
> >> variant=altgr-intl
> >> options=lv3:ralt_switch,grp:alts_toggle
> >>
> >> Which is identical to my laptop's settings at the time I started qtnx.
> >>
> >> I tried with the Swiss French keyboard and got the following "keyboard"
> >> file:
> >> rules=evdev
> >> model=pc105
> >> layout=ch
> >> variant=fr
> >> options=lv3:ralt_switch,grp:alts_toggle
> >>
> 
> @Stephane: last night my x2goagent options line was still buggy, I  
> have fixed this now, but no success so far:
> 
> mike at x2goserver:~/.x2go/C-mike-117-1306579861_stDGNOME_dp24$ cat keyboard
> rules=evdev
> model=pc105
> layout=de
> variant=nodeadkeys
> options=
> 
> mike at x2goserver:~/.x2go/C-mike-117-1306579861_stDGNOME_dp24$ cat options
> nx/nx,link=adsl,pack=16m-jpeg-9,limit=0,root=/home/mike/.x2go/C-mike-117-1306579861_stDGNOME_dp24,cache=8M,images=32M,type=unix-kde-depth_24,id=mike-117-1306579861_stDGNOME_dp24,cookie=17bdec4e439b3ba0bd8fd0b7cca3659c,errors=/home/mike/.x2go/C-mike-117-1306579861_stDGNOME_dp24/session.log,geometry=1024x768,resize=0,fullscreen=0,accept=localhost,listen=30202,client=linux,menu=0,keyboard=defkeymap,kbtype=pc105/defkeymap:117
> 
> mike at x2goserver:~/.x2go/C-mike-117-1306579861_stDGNOME_dp24$ xprop  
> -root _XKB_RULES_NAMES
> _XKB_RULES_NAMES(STRING) = "xfree86", "pc105", "defkeymap", "", ""
> 
> Do you have a clue with which nxagent version the ,,keyboard'' file  
> has been introduced into NX?
> 
> Best,
> Mike

Hi,

I just spent a bit of time grepping through the code of the nxagent I
have on my servers.

Apparently the keyboard file is some trick that was added as a patch in
FreeNX's code to dump the keyboard configuration received by the agent,
so not really that useful. (Attached the patch in question to this mail
if that helps).

So then I played a bit with setxkbmap on my X2go server to check exactly
what should be set to:
 1) Fix the alt-gr issue
 2) Make my weird keyboard layouts work (-layout ch -variant fr and
-layout us and -variant altgr-intl)

Each time playing with setxkbmap and re-checking "xprop -root" to look
at the result.

First test with my laptop using the US international + alt-gr dead keys
layout (-layout us -variant altgr-intl):
 - Initial value on x2go is: "xfree86", "pc105", "us", "", "". Layout is
regular US and alt-gr is broken (acts like ALT is pressed all the time)
 - setxkbmap -layout us -variant altgr-intl: Dead keys work now but
alt-gr is still acting like it's pressed all the time.
 - setxkbmap -rules xfree86: Fixes the alt-gr issue giving me the right
layout and behaviour.

"xfree86", "pc105", "us", "altgr-intl", "" is the end working result.
This can be achieved by running: setxkbmap -layout us -variant
altgr-intl -rules xfree86

I then tried again with the Swiss French layout, using:
setxkbmap -layout ch -variant fr -rules xfree86

Which gave a similar result. Adding that line in my .bashrc solved
pretty much all my layout issues.

Hope it helps!



Hope it helps!

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 93_export_remote_keyboard_config.dpatch
Type: application/x-shellscript
Size: 3056 bytes
Desc: not available
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20110528/4cde58c8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20110528/4cde58c8/attachment.pgp>


More information about the x2go-dev mailing list