On 7/4/24 12:44 PM, Ulrich Sibiller wrote:
Hi,
I think this could be solved using autograb. Unfortunately the default config seems not to enable it. Try the following.
- on the server side create ~/.x2go/config/keystrokes.cfg with this content: <!DOCTYPE NXKeystroke> <keystrokes> <keystroke action="close_session" Control="1" AltMeta="1" key="t" /> <keystroke action="switch_all_screens" Control="1" AltMeta="1" key="f" /> <keystroke action="fullscreen" Control="1" Shift="1" AltMeta="1" key="f" /> <keystroke action="minimize" Control="1" AltMeta="1" key="m" /> <keystroke action="defer" Control="1" AltMeta="1" key="e" /> <keystroke action="force_synchronization" Control="1" AltMeta="1" key="j" /> <keystroke action="resize" Control="1" AltMeta="1" key="r" /> <keystroke action="viewport_move_left" Control="1" Shift="1" AltMeta="1" key="Left" /> <keystroke action="viewport_move_left" Control="1" Shift="1" AltMeta="1" key="KP_Left" /> <keystroke action="viewport_move_up" Control="1" Shift="1" AltMeta="1" key="Up" /> <keystroke action="viewport_move_up" Control="1" Shift="1" AltMeta="1" key="KP_Up" /> <keystroke action="viewport_move_right" Control="1" Shift="1" AltMeta="1" key="Right" /> <keystroke action="viewport_move_right" Control="1" Shift="1" AltMeta="1" key="KP_Right" /> <keystroke action="viewport_move_down" Control="1" Shift="1" AltMeta="1" key="Down" /> <keystroke action="viewport_move_down" Control="1" Shift="1" AltMeta="1" key="KP_Down" /> <keystroke action="viewport_scroll_left" Control="1" AltMeta="1" key="Left" /> <keystroke action="viewport_scroll_left" Control="1" AltMeta="1" key="KP_Left" /> <keystroke action="viewport_scroll_up" Control="1" AltMeta="1" key="Up" /> <keystroke action="viewport_scroll_up" Control="1" AltMeta="1" key="KP_Up" /> <keystroke action="viewport_scroll_right" Control="1" AltMeta="1" key="Right" /> <keystroke action="viewport_scroll_right" Control="1" AltMeta="1" key="KP_Right" /> <keystroke action="viewport_scroll_down" Control="1" AltMeta="1" key="Down" /> <keystroke action="viewport_scroll_down" Control="1" AltMeta="1" key="KP_Down" /> <keystroke action="reread_keystrokes" Control="1" AltMeta="1" key="k" /> <keystroke action="autograb" Control="1" AltMeta="1" key="g" /> <keystroke action="dump_clipboard" Control="1" Shift="1" AltMeta="1" key="c" /> </keystrokes>
- start a NEW session or disconnnect/reconnect a running session
- press ctrl-alt-g in the session to activate autograb
You can also activate autograb by default by adding one of these two to /etc/x2go/x2goagent.options: X2GO_NXAGENT_DEFAULT_OPTIONS+=" -autograb"
or
X2GO_NXOPTIONS="autograb=1"
Does it work like you need it?
Thanks, the second option works. I was wondering why the keystrokes.cfg is a user account based file and not a system wide file? The x2go server is running system wide right?
keystrokes.cfg