Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Xubuntu - Setting Keyboard Shortcuts

One of the first things I do after performing a fresh installation of any distribution, is to set up the keyboard shortcuts.

I used to set them with a script in Ubuntu, but I have not figured out how to do this yet with Xubuntu. If you know how, please leave a comment.

Steps

For Xubuntu, one just has to launch they keyboard application by starting the launcher with SUPER + R and then typing keyboard.

Then navigate to the Application Shortcuts tab.

Then either:

  1. Click the Add button if you want to create a new shortcut
  2. Double click on the command of a shortcut, to edit the command.
  3. Double click on the shortcut to change the key-combo you need to use to activate the command.

When creating a new shortcut, or having double clicked on the command, you will see the following window. Fill it with the command you wish the keyboard shortcut to run.

When you double click the key-combo, you will see the following window. As you hold down keys, you will see the names of the keys in bold as indicated.

Shutter Shortcuts

If you are like me, and you prefer to use Shutter (installation instructions) to manage your screenshots, then you will probably to set the following shortcuts:

  • Print Screen - shutter --full
  • Alt + Print Screen - shutter --window
  • Shift + Print Screen - shutter --select

I would normally use shutter --active for Alt + Print Screen, but that seems to be bugged.

I struggled for a long time to figure out how to set Alt+Print as a shortcut. One has to hold down Print Screen first, and then hold down the Alt key, and do this for a while for it to fully register. If you try setting it by pressing the Alt key first, it won't work.

Spotify Shortcuts

  • Skip Forward / Next
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
  • Go back.
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

Keyboard Shortcuts File Location

If you are interested where the file is that stores the keyboard shortcuts, it is at:

$HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

This is the case for Xubuntu 22.04.

References

Last updated: 23rd November 2023
First published: 5th September 2020