Does anybody know how I can write a script to define my keyboard shortcuts in Xubuntu 18.04?

I am constantly setting up new computers with the distro, and I would like to add this to my "installation script" that sets up my computer how I like it. I used to do it using the following on Ubuntu 16.04:


BEGINNING="gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"


gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings \
"['$KEY_PATH/custom0/', '$KEY_PATH/custom1/', '$KEY_PATH/custom2/', '$KEY_PATH/custom3/', '$KEY_PATH/custom4/', '$KEY_PATH/custom5/']"

# Take a screenshot of the entire display
$BEGINNING/custom0/ name "Take Full Screenshot"
$BEGINNING/custom0/ command "shutter --full"
$BEGINNING/custom0/ binding "Print"

# ...

... but that doesn't work in Xubuntu as I get the following message:

No such schema “org.gnome.settings-daemon.plugins.media-keys.custom-keybinding”
  • 1
    Should be possible with xfconf-query – vanadium Feb 8 at 12:13
  • XFCE isn't GNOME. I haven't done what you want, nor am I using 18.04 so cannot look, but I'd have looked for changes in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml (this is on my 20.04 which is fully GTK3 unlike your 18.04; but I doubt it makes a difference, but...) – guiverc Feb 8 at 12:21

Your Answer

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

Browse other questions tagged or ask your own question.