[X2Go-Dev] Fwd: [Bug 1033876] New: x2go session does not set correct keyboard type
Mike Gabriel
mike.gabriel at das-netzwerkteam.de
Thu Nov 28 09:46:41 CET 2013
Hi Orion,
On Do 28 Nov 2013 01:12:18 CET, Orion Poplawski wrote:
> This in x2gostartagent seems wrong:
>
>
> if [ "$X2GO_SET_KBD" == "0" ] || [ "$X2GO_KBD_TYPE" != "auto" ]; then
> $X2GO_LIB_PATH/x2gosyslog "$0" "info" "blocking creation of
> agent's keyboard file ${SESSION_DIR}/keyboard as requested by
> session startup command"
> mkdir -p ${SESSION_DIR}/keyboard
> fi
>
> In the normal case, X2GO_SET_KBD is 1 and the type is specified as
> pc105/us or pc105/gb, etc. Since X2GO_KBD_TYPE != auto it does not
> set the keyboard setttings.
This is a bit hacky, I agree. Let me start from the beginning...
The ~/.x2go/<session>/keyboard file gets created by x2goagent. Always.
It is a file containing settings for the client-side keyboard. This
parameter in this file can be used to configure the session keyboard
automagically.
Now, we have three different keyboard setup types (actually four):
1. do not do anything about keyboard setup
-> X2GO_SET_KBD = 0
-> X2GO_KBD_TYPE = null/null (or so)
2. set a keyboard specified in X2Go Client
-> X2GO_SET_KBD = 1
-> X2GO_KBD_TYPE = pc105/de (or so)
3. auto-detect client-side keyboard
-> X2GO_SET_KBD = 1
-> X2GO_KBD_TYPE = auto
Only with this third parameter combination we want the
~/.x2go/<session>/keyboard to be created by x2goagent. Best (only?)
way for this is blocking the file name with a directory. x2goagent
will silently stumble over this blocked directory/file name and it
will not create the keyboard file.
(4. from Mac OS X you can theoretically use X2GO_KBD_TYPE = query. In
X2Go Client, however, there is code that sets X2GO_KBD_TYPE=query and
X2GO_SET_KBD=0, this basically disables the X2GO_KBD_TYPE=query. I
tested with a Mac User on IRC lately how the effect would be if we
switched this combination to X2GO_KBD_TYPE=query and X2GO_SET_KBD=1.
On his setup that change worked, so I added that to the latest X2Go
Server release. However, Anders has just reported a f****-up keyboard
layout since the latest X2Go Server release and I suspect that that
code is effecting that).
Next fact that comes into play here now is: the script
x2gosetkeyboard. This script is responsible for reading the
~/.x2go/<session>/keyboard, extracting its information and running
setxkbmap on the X2Go session's $DISPLAY. This, I found, is only good
working well, if that x2gosetkeyboard call is evoked from
x2goruncommand. However, x2goruncommand does not know about
X2GO_SET_KBD and X2GO_KBD_TYPE.
Thus, I have to leave a message for x2gosetkeyboard via the
x2gostartagent script. The information required is: is x2gosetkeyboard
supposed to run or not. This I do with creating
~/.x2go/<session>/keyboard as a directory prior to launching x2goagent.
So, IMHO the if clause above is just selecting the described case.
> I'm not sure what is trying to be done here. An earlier comparison is:
>
> if [ "$X2GO_SET_KBD" == "0" ] || [ "$X2GO_KBD_TYPE" == "auto" ];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_LOG},kbtype=null/null,${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0"
> 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_LOG},kbtype=${X2GO_KBD_TYPE},${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0"
> fi
This one is also correct... In this if clause we set the NX option
kbtype=null/null or kbtype=${X2GO_KBD_TYPE}. We only want to set
kbtype=${X2GO_KBD_TYPE}, if it is not auto and X2GO_SET_KBD is
enabled. This is handled by the above quoted if-clause IMHO.
> So you probably want a == auto.
Don't think so...
Mike
--
DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20131128/75186c6b/attachment.pgp>
More information about the x2go-dev
mailing list