Hello,
I’m using NX 5.1.7 to connect from a CentOS 7.2 laptop with a French keyboard to a CentOS 7.2 server with an Italian keyboard attached to it. Since I’m the only one connecting to this server, I would like to get the French keyboard layout for the duration of the NX session.
I have modified /usr/NX/etc/node.cfg to configure 2 user scripts to automatically change the keyboard layout as such:
UserScriptAfterSessionStart "/etc/NX/scripts/sessionstart.sh"
UserScriptAfterSessionDisconnect "/etc/NX/scripts/sessionend.sh"
UserScriptAfterSessionClose "/etc/NX/scripts/sessionend.sh"
UserScriptAfterSessionFailure "/etc/NX/scripts/sessionend.sh"
where the scripts are
sessionstart.sh
#!/bin/sh
setxkbmap fr
exit 0
sessionend.sh
#!/bin/sh
setxkbmap it
exit 0
However, when I log in I still get the Italian keyboard layout: my script is either not called or if it’s called then it doesn’t affect my NX session.
Any suggestion to make this work?
Thanks in advance