Ubuntu – Unity Ctrl + Alt + Del set default value to ‘Lock’

lock-screenlogoutunity

When I press Ctrl + Alt + Del I get a dialog with two buttons: Log-out and Lock.

I spent a significant portion of my time working on Windows workstations, and the default there is Lock. It is a habit, that when I want to leave my computer I lock it by quickly pressing Ctrl+ Alt+Del and Enter.

It's frustrating that in unity the default value of the dialog box is Logout, and I end up logging out and sometimes unsaved work is lost.

How do I make the default value Lock instead of Log-out?

Best Answer

You can override the default shortcut by creating your custom shortcut for this purpose.

  • Go to System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts

  • Add a shortcut with any name with following command in command box

    qdbus org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
    
  • Now click on this newly created shortcut and assign it Ctrl+Alt+Del
  • Click on Reassign if popup window is appearing with warning message about shortcut conflict.




To restore the default behaviour of Ctrl+Alt+Del shortcut

  • Delete your custom shortcut.
  • Select System in left column of shortcut setting window.
  • Select logout shortcut and assign it Ctrl+Alt+Del
Related Question