Hi Stéphane, hi list,
@List: Stéphane and I have had a private discussion (SORRY!) and I
have asked him to lead the discussion on the x2go-dev ML as it might
be of interest for other X2go developers and advanced users... I'll
quite the full mail around keyboard settings with X2go...
On Do 26 Mai 2011 23:05:39 CEST Stéphane Graber wrote:
On Thu, 2011-05-26 at 22:51 +0200, Mike Gabriel wrote:
Hi Stéphane,
On Do 26 Mai 2011 20:06:16 CEST Stéphane Graber wrote:
Yep, that was my problem actually as I can only find: kblayout (str) - keyboard layout, e.g. us (default), de, fr, ... kbtype (str) - keyboard type, e.g. pc105/us (default), pc105/de, ...
But not kbvariant (or similar). Which means my two usual keyboard layouts won't work ...
I'm using: kblayout = us kbtype = pc105 kbvariant = altgr-intl
Good point. I have just looked at the x2goserver code a bit closer. As Python X2go is basically a wrapper it wraps around something: NX. And in NX there is only a kbtype option (nxproxy --help). This kbtype is set (with a bunch of other options) as the DISPLAY variable of the nxagent/x2goagent on the server.
Probably it might be best is to issue a setxkbmap command just before starting the actual session.
What do you think, would that help? I can implement that in pyton-x2go directly (by also adding the kbvariant method parameter).
Greets, Mike
Hi!
Yep, that'd work for me.
I had a quick look at the way it seems to work for my with qtnx + freenx. The options are: nx/nx,keyboard=defkeymap,kbtype=pc102/defkeymap,cache=64M,images=16M,link=adsl,nodelay=1,type=unix-desktop,clipboard=both,cleanup=10,product=LFE/None/LFEN/None,shmem=1,backingstore=when_requested,shpix=1,accept=127.0.0.1,cookie=01db5d8f49eb99cc24960b8e44ece0df,id=weblive-appserv02-2012-19B946687E199316F70C3C215EBFDE70,samba=0,media=0,menu=1:2012
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
I have added defkeymap / keyboard file support to python-x2go.
However, when I tested it with one of my X2go servers, it resulted in
this output:
mike@x2goserver:/srv/homes/mike$ xprop -root _XKB_RULES_NAMES _XKB_RULES_NAMES(STRING) = "xfree86", "pc105", "defkeymap", "", ""
Although my keyboard file looks like this:
rules=evdev model=pc105 layout=de variant=nodeadkeys options=
I then grepped X2go's nxagent fork x2goagent:
mike@devsystem:~/x2go-upstream/x2goagent$ grep -ri defkeymap * mike@devsystem:~/x2go-upstream/x2goagent$
-> that is: it resulted in no output at all...
@devs: is there any chance that we incorporate latest nxagent code
into x2goagent???? The handling of keyboard files would probably solve
quite a few bugs around keyboard/keymap problems...
Greets, Mike
--
DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419
GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
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@x2goserver:~/.x2go/C-mike-117-1306579861_stDGNOME_dp24$ cat keyboard rules=evdev model=pc105 layout=de variant=nodeadkeys options= mike@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@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 <quote cmd="diff -u x2gostartagent.bak x2gostartagent"> --- x2gostartagent.bak 2011-05-28 12:18:13.000000000 +0200 +++ x2gostartagent 2011-05-28 12:57:32.000000000 +0200 @@ -210,22 +210,21 @@ xauth add ${HOSTNAME}:${X2GO_PORT} MIT-MAGIC-COOKIE-1 ${X2GO_COOKIE} - -if [ "$X2GO_SET_KBD" == "0" ] -then X2GO_HOST=nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},\ id=${SESSION_NAME},\ -cookie=$X2GO_COOKIE,errors=${SESSION_DIR}/session.log,kbtype=null/null,\ +cookie=$X2GO_COOKIE,errors=${SESSION_DIR}/session.log,\ geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0 + +if [ "$X2GO_SET_KBD" == "0" ]; then + X2GO_HOST=${X2GO_HOST},kbtype=null/null else -X2GO_HOST=nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},\ -id=${SESSION_NAME},\ -cookie=$X2GO_COOKIE,errors=${SESSION_DIR}/session.log,kbtype=${X2GO_KBD_TYPE},\ -geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0 + if [ "$X2GO_KBD_LAYOUT" != "defkeymap" ]; then + X2GO_HOST=${X2GO_HOST},kbtype=${X2GO_KBD_TYPE} + else + X2GO_HOST=${X2GO_HOST},keyboard=defkeymap,kbtype=${X2GO_KBD_TYPE} + fi fi - - echo "${X2GO_HOST}:${X2GO_PORT}" >${SESSION_DIR}/options NX_AGENT=:${X2GO_PORT} </quote> -- DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419 GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
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@x2goserver:~/.x2go/C-mike-117-1306579861_stDGNOME_dp24$ cat keyboard rules=evdev model=pc105 layout=de variant=nodeadkeys options=
mike@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@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:
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):
"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