I'm running 16.04 with LXDE on an old server. Graphics are obviously not awesome (8MB onboard graphics), so I am using x2go to forward my xsession over 10 100 1000. The problem is that the keystrokes (such as alt+tab, ctrl+alt+right, etc.) don't bind to the application, so instead of switching applications within x2go, it switches from the x2go application to the next open program on the client machine.

How could I bind all keystrokes (even nicer, one keystroke excluded) to a single application?

The client computer is running Unity. The host (the computer whose session I am sending through x2go) is running LXDE.


Disable Unity shortcuts

  1. Install ccsm

     sudo apt-get install compizconfig-settings-manager
  2. Go to Desktop category → Ubuntu Unity plugin → Switcher tab

    Click on each shortcut, uncheck Enable, then OK

  3. Go to Desktop category → Desktop Wall → Bindings tab

    Same way, disable the shortcuts that you want.

  4. Close ccsm, It is effective right after closing.

ccsm shortcuts have priority on custom one from system settings. You can use dconf to see the underlying setting changed when you make the above steps using GUI.

$ dconf watch /




So better to make a wrapper script to disable unity switcher shortcuts, launch x2goclient, then enable them back after closing x2goclient.

dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-prev "'Disabled'"
dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-forward "'Disabled'"
dconf reset /org/compiz/profiles/unity/plugins/unityshell/alt-tab-prev
dconf reset /org/compiz/profiles/unity/plugins/unityshell/alt-tab-forward

Disable LXDE shortcuts

Old answer that could be useful for some.

The shortcut you mention belong to OpenBox. Which is launched with predefine settings for Lubuntu. (At least this is the case for Lubuntu 14.04).

~$ pgrep -a openbox
4772 openbox --config-file /home/lubuntu/.config/openbox/lubuntu-rc.xml

We should unbind them from OpenBox or any tools already binded them.

  1. Open its configuration file for editing

     leafpad ~/.config/openbox/lubuntu-rc.xml
  2. Then comment the shortcuts you want using XML comment tags <!-- --> or delete them.

New customized shortcut forwarded to x2goclient

After that setup global shortcuts to forward shortcut to x2goclient window using wmctrl & xvkbd.

  1. System Settings → Keyboard → Shortcuts tab

  2. Add new custom shortcut with command

     bash -c 'wid=$(wmctrl -l | awk "/X2Go Client/ {print $1; exit}"); echo $wid; if [ "$wid" ] ; then xvkbd -window $wid -xsentevent -text "\A\t"; fi'

    for AltTab

  • Looks like you're on to something... Only problem is that the client computer isn't running LXDE; it's running Unity.
    – anonymous2
    Jul 4 '16 at 15:03
  • @anonymous2 then LXDE is misleading, Could you edit question and add that you are running Unity. It is important & the answer with depend on it
    – user.dz
    Jul 4 '16 at 15:07
  • Done. Sorry about that, I'm not sure how I overlooked that.
    – anonymous2
    Jul 4 '16 at 15:12
  • 1
    And if this is the best I can get, I'll take it, but as the title implies, my preferred solution would actually bind the keystrokes to a particular application, such that I can still use them in the client's operating system.
    – anonymous2
    Jul 4 '16 at 15:15
  • @anonymous2, I added kind of workaround, please see if it works.
    – user.dz
    Jul 7 '16 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.