Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

This question has been asked already, but it doesn't seem to apply to Ubuntu 12.10. The file formats of /usr/share/gnome-control-center/keybindings/ has changed.

I tried the script someone kindly provided...

cd /usr/share/gnome-control-center/keybindings
for entry in $(grep KeyListEntry * |cut -d'/' -f2- |cut -d'"' -f1); do
    echo $entry
    gconftool -u "/$entry"
done

But it returns...

Error unsetting '/KeyListEntry>': Bad key or directory name: "/KeyListEntry>": '>' is an invalid character in key/directory names

...for every entry.


I changed a few of the keyboard shortcuts thinking it would only apply to my bluetooth keyboard, but I was wrong.

How can I go about resetting them in Ubuntu 12.10?

Some items like, Monitor Brightness Down, do not appear in Keyboard Settings 'Shortcuts', which is why I am looking for a reset.

share|improve this question

marked as duplicate by Eliah Kagan, Seth, Javier Rivera, hhlp, LnxSlck Feb 17 '13 at 3:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

1. Boot the Live CD

2. When you get to the desktop, go to Keyboard shortcuts (type gnome-control-center keyboard and go to shortcuts tab)

3. Write down the shortcuts you want to restore (don't forget to label them so you know what they are for!).

4. Shut down the Live CD

5. Boot-up Ubuntu normally

6. type gnome-control-center keyboard again and go to shortcuts tab and edit the shortcuts...

7. Repeat step 6 for all shortcuts you wish to change back.

Also you can copy the folder /usr/share/gnome-control-center/keybindings/ from the live CD to a USB or something and replace the folder you have in Ubuntu.

EDIT: I uploaded that folder for you, it's in zip so unzip it and paste it in /usr/share/gnome-control-center/ (replace the current) I didn't edit any shortcuts.

share|improve this answer
    
I tried copying/moving your unzipped folder via terminal, and it kept reporting 'Device or resource busy'. I even tried via the live CD. I have not tried manually editing the shortcuts as you mention, because I am unsure which ones have changed. –  Crimbo Feb 21 '13 at 12:42
    
Type lsof +D /usr/share/gnome-control-center/ and then kill the process that is using it or just do that in recovery mode. –  Da1T Feb 24 '13 at 17:58
    
Thanks, but that command seems wrong. Running lsof +D -V /usr/share/gnome-control-center/ tells me lsof: +d not followed by a directory path. So instead I run lsof -V /usr/share/gnome-control-center/keybindings/ and that tells me lsof: no file use located: /usr/share/gnome-control-center/keybindings/. I tested the output by pretending to edit one of the files to see if it noticed, and it did. This also happened via recovery mode (root shell). So in summary, I still do not know why it is stating 'Device or resource busy' –  Crimbo Mar 13 '13 at 0:24

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