PDA

View Full Version : [ubuntu] Edit keyboard shortcuts with script or command line



vide_infra
December 3rd, 2014, 10:58 PM
I'm looking for a way to edit the keyboard shortcuts either through a script or through command line. I know you can manually edit them through System Settings>Keyboard>Shortcuts.

I need an automated way to set the Ctrl+Alt+Del shortcut to "Disabled". I've searched and have yet to find any way to edit with script/command line.

No, I'm not looking to use another program to manage this like gconf-editor. Also, commenting out the command in /etc/init/control-alt-delete.conf doesn't work as needed.
Running Ubuntu 12.04.5 LTS.

Thanks.

CantankRus
December 4th, 2014, 01:31 AM
This tested on Trusty.

To disable....

gsettings set org.gnome.settings-daemon.plugins.media-keys logout ''

To reset to default (ctrl+alt+DEL)...

gsettings reset org.gnome.settings-daemon.plugins.media-keys logout

mc4man
December 4th, 2014, 02:19 AM
Well I don't have any 12.04 installs around but if it (at a default) is in gconf than you should be able to change with a gconftool-2 -s command
(you need to find the type, path & value. Take a look in gconf-editor to discover those.