6

How to disable Ctrl+Q system wide?

I read the other answers but they did not help. Reassigning the shortcut is not possible, since pressing the key combination quits the settings window, so it does not have any effect.

Thanks in advance.

3
  • Like I said in the question "... pressing the key combination quits the settings window, so it does not have any effect". Did you tried it yourself at all?
    – peter
    Oct 15, 2012 at 13:02
  • The first answer worked for me, with no workarounds. Maybe it got fixed in newer Ubuntu versions? Anyway, +1'd. Sep 8, 2016 at 2:21
  • Also, no reboot/relogin/whatever required, it worked out straight up. Sep 8, 2016 at 2:24

2 Answers 2

5

open dash and choose desktop shortcut

Then go to shortcut tab and there press at +(add) sign to add a new shortcut

On the name write anything and for command write /bin/false which means do nothing in really then assign Ctrl+Q as its shortcut.

enter image description here

This actually make Ctrl+Q execute command /bin/false which means nothing

2
  • 2
    Whenever I try to assign [Ctrl]+[Q] to the new shortcut the Keyboard program closes.
    – AnnanFay
    Dec 10, 2012 at 22:02
  • Worked in Ubuntu 14.04! Sep 5, 2014 at 22:32
4

Answering my own question !

I got it. Create a new shortcut to /bin/false as previous answer mentioned, but assign something else than Ctrl+Q to it , since you cannot do that. Ctrl+J might be good. Restart computer. Open the file /home/$USER/.gconf/desktop/gnome/keybindings/custom0/%gconf.xml in a text editor. And look for:

<entry name="binding" mtime="1350630493" type="string">
        <stringvalue>&lt;Primary&gt;j</stringvalue>
</entry>

and in the

<stringvalue>&lt;Primary&gt;j</stringvalue>

change the last letter of the text between the tags from the lowercase equivalent of what key you assigned before rebooting to "q". So it ends up as

<stringvalue>&lt;Primary&gt;q</stringvalue>

Save, reboot, done.

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