39

I am a new Xubuntu user. Earlier when using Gnome, I was able to configure several desktop shortcuts, particularly for navigation between workspaces.

But, now in Xubuntu, I cannot find those options.

Where can I find those options.

6 Answers 6

52

Keyboard shortcuts are tucked away in your Settings Manager - Window Manager - Keyboard

enter image description here

Scroll down the list - you will see several workspace shortcuts, some defined with a shortcut and some awaiting to be defined.

23

There are more available in Settings Editor in Settngs Manager, which can be launched from the command-line using:

xfce4-settings-editor

This will display:

XFCE4 Settings Editor

5
  • I tried changing my left_workspace_key to <Super>Left using the editor with sudo. Restarted and the shorcuts remain bound to <Control><Alt>Left any help? en.zimagez.com/zimage/screenshot-10252014-012914pm.php Oct 25, 2014 at 20:32
  • 1
    I just switched from Windows. This is so easy to use and navigate! SCREW YOU, REGEDIT! :D Aug 26, 2015 at 1:16
  • this is not the answer. I voted for the other one Mar 14, 2016 at 2:22
  • this is editable through cli? Jan 2, 2017 at 11:22
  • @VitalyZdanevich I think so, see xfconf-query -v -l -c xfce4-keyboard-shortcuts
    – Xen2050
    Feb 15, 2019 at 11:20
8

For Xfce 4.8 (Xubuntu 12.04 LTS)

Keyboard shortcuts are accessible from Settings -> Settings Manager -> Keyboard -> Application Shortcuts:

enter image description here

  • Choose "Add" to add a command you need to assign to a shortcut.
    enter image description here

  • In the window following "Ok" press the key combination you want to assign:
    enter image description here

1
  • What would I add here to make <Super> open the Application Menu?
    – Eyal
    Apr 21, 2013 at 20:24
7

Automate this with xfconf-query

If multiple machines require configuring keyboard shortcuts, this can be done without having to repeatedly open windows. Rather, use the very handy xfconf-query command in a bash script to --set a --property in xfce4-keyboard-shortcuts.xml.

Here is an example:

$ xfconf-query --create --channel xfce4-keyboard-shortcuts --property /commands/custom/XF86AudioMute --type string --set 'amixer -D pulse set Master 1+ toggle'

As a matter of fact, this is part of my solution to restore the function of the mute button in Xubuntu 12.04.

2
  • 2
    Works great if you are adding a new shortcut. If you however need to alter an existing one, you first have to delete it by the --reset option and create it again. Otherwise the running XFCE session will not pick it up.
    – Jakub
    Dec 27, 2015 at 10:49
  • How would one go about using a different button to bind the command to? For example CtrlAltUp? In other words, how did you know to use /commands/custom/XF86AudioMute? Apr 22, 2016 at 21:17
1

You can also play in a console with gedit and /apps/metacity/keybinding_commands or /apps/metacity/global_keybindings

1

Easy Way

Heres a script that handles binding commands to keys cleanly in Xubuntu. Download keybind.c, compile it (example is given in readme in link) and simply run ./keybind "<keys to bind to>" "<command>"

For example heres some I use:

./keybind "<Control><Alt>Delete" "gnome-system-monitor"

./keybind "<Control><Alt>Up" "xrandr -o inverted"
./keybind "<Control><Alt>Down" "xrandr -o normal"
./keybind "<Control><Alt>Right" "xrandr -o left"
./keybind "<Control><Alt>Left" "xrandr -o right"

Disclosure: I created the script.

Slightly less Easy Way

If you're running a Xubuntu system and want to do it from the terminal it is a simple procedure too.

For debugging, here is where keybinding shortcuts are stored in XFCE4: $ gedit ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

Underlying Schema:
1) Remove existing commands bound to the binding keys
2) Set new command to keys

1a) 
`xfconf-query --reset --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Control><Alt>Down"`<br />
`xfconf-query --reset --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Control><Alt>Down"`<br />
2)
`xfconf-query --create --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Control><Alt>Down" --type string --set 'gedit'`

note if you're binding to key, ubuntu systems treat and equally and you will need to unbind any key bindings with in the above example <Primary><Alt>Down

1
  • Is that linked "script" really a C program, that just runs terminal commands, kind of like a more complicated shell script?
    – Xen2050
    Feb 15, 2019 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .