0

I used to have a lot of custom shortcuts on my user session, Settings > Keyboard > Shortcuts > Custom Shortcuts. I network upgraded today from LTS 12.04 to LTS 14.04.1. I logged in to my user, and alas! no more custom shortcut keys (the rest of my modifications, except only for the custom shortcuts, are there). The list became empty. Can somebody please tell me how I could restore all those Custom Shortcuts? :-)

1 Answer 1

0

I got the same problem today. I wrote a small script to convert the old keybindings to the new interface.

#!/bin/bash

# Delete old new-style keybindings
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[]"

gconftool-2 -R /desktop/gnome/keybindings | while read LINE; do
    read BINDINGLINE
    read ACTIONLINE
    read NAMELINE
    NUM="`echo "$LINE" | sed -e 's@^/desktop/gnome/keybindings/custom@@g' -e 's/:$//g'`"
    BINDING="`echo "$BINDINGLINE" | sed 's/^binding = //g'`"
    ACTION="`echo "$ACTIONLINE" | sed 's/^action = //g'`"
    NAME="`echo "$NAMELINE" | sed 's/^name = //g'`"  

    gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$NUM/ name "'$NAME'"
    gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$NUM/ command "'$ACTION'"
    gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$NUM/ binding "'$BINDING'"
    CURRENTLIST="`gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings`"
    CURRENTLIST="${CURRENTLIST%]}, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$NUM/']"
    gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "${CURRENTLIST/[, /[}"
done

You must log in to answer this question.

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