wrong key to char mapping when starting an xterm in Xnest
some oddity that I can't get my head to fix..
probably I need to run xmodmap (?) or something.
basically I want to run remote application in my local pc, and since ssh -Y doesn't work as expected (see this post
I started an Xnest in my local pc as follows:
Xnest -geometry 1024x768 -ac :2
and then in another terminal, I started an xterm within this Xnest server as:
xterm -display :2
The problem is that if I now try to type something, the keys that I press on my keyboard do not correspond to the keys that show up on that xterm.
how can I fix that??
thank you all for your help.
EDIT: I tried xev, the keys pressed correspond to the char that appears on screen.
EDIT2: the above statement corresponds to running xev on the local display only, if i run xev on the Xnested xterm, the key code and keysym are a mess.
xev on local display: i press 'q' on keyboard. xev returns keycode 54 (keysym 0x71,q)
xev on Xnest display: i press 'q' on keyboard. xev returns keycode 54 (keysym 0x63,c)
hm this all seems to be due to the vnc server (hope you read the other post) for some reason (or the lack of sourcing some config file)
basically, the keycodes that are generated in a local slackbox (that has keyboard, mouse and screen), are different to the keycodes that xev understands on the pc which I accept through vnc.
so while the vnc server has some internal xmodmap file to follow, (with different keycode-keysym pairs), when I start an Xnest from within that vnc'ed session, the normal xmodmap file is sourced. only now there is keycode mismatch.
this is poorly explained so i'll give an example:
xev on local machine: I press 'q' , xev returns keycode 24, keysym 0x71 ,q
(checked with 'xmodmap -pke': keycode 24 = q Q q Q, notice that also that keycode 54 = c C c C )
xev on local machine again: I press 'c' , xev returns keycode 54, keysym 0x63 ,c
(checked with 'xmodmap -pke': keycode 54 = c C c C )
xev on vnc machine: I press 'q' , xev returns keycode 54, keysym 0x71 ,q
(the 'xmodmap -pke' returns a different xmodmap here: keycode 54 = q Q, so I get the right keysym, but for a different keycode)
xev on Xnested 3rd machine, accessed through vnc machine: I press 'q' , xev returns keycode 54, keysym 0x63 ,c
(the xmodmap of the Xnest session is indeed the same as the one on the local machine, but since it gets a different keycode from the vnc , it will also output a different keysym)
bammer, so the question is why does tightvnc understands different keycodes than the codes that the local machine understands?
ok i'm contacting tightvnc to figure out why the vnc session understands different keycodes for the keys pressed (and thus uses a different xmodmap file to show the correct characters).
In the meantime, in order for me to do what I initially wanted - that is to type the correct characters in the Xnest'ed xterm, I used the command from within the xvnc session (note that I have ssh -Y to the Xnest pc and started up the Xnest on that remote pc, not on the vnc session pc)
Then I ssh -Y (from within the vnc session) to the remote Xnested pc, copy the xmodmap-vnc-file (with scp perhaps) and use the same command to overload Xnests xmodmap with the vnc's xmodmap
|All times are GMT -5. The time now is 04:36 PM.|