Disable Ctrl-Alt-L's behavior of locking the screen

10,586

Solution 1

This worked for me: https://stackoverflow.com/questions/24908490/ubuntu-do-not-lock-the-screen-when-pressing-superl

Basically: Unity also has a shortcut that overrides the one in the keyboard configuration, and you can edit it using CompizConfig (you can install it via Ubuntu Software, search for CompizConfig Settings Manager). Remapping wasn't working in all cases for me, but completely disabling the shortcut (uncheck "Enabled") did the trick. Ctrl+Alt+L now works well in IntelliJ Idea.

Solution 2

Disable nothing and use meta key (aka Super or Windows key)

Hold down Ctrl+Alt+Meta+L and Ubuntu will ignore this for Lock Screen but your application will interpret it as Ctrl+Alt+L.

Disable Ctrl+Alt+T in Ubuntu shortcuts

Go to System Settings -> Keyboard -> Shortcuts -> System -> Lock Screen and hold down Ctrl+Alt+Shift+Z

ctrl+alt+L override.png

This will hopefully allow you to reassign the original key combination in another application.

To disable lock screen permanently

Use:

gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'

Source: https://ubuntuforums.org/showthread.php?t=2359828

On my dual monitor system the lock screen no longer appears when pressing Ctrl+Alt+L. However the screens saver still kicks in and you have to move mouse, touch a key, etc to turn the monitors back on. Although a password is not required to unlock the screen it might be a bug.

Share:
10,586

Related videos on Youtube

vaquito
Author by

vaquito

~50 milliskeet Senior Developer currently doing CI-CD related work at https://www.ufst.dk/ CV/resume: https://ravn.github.io/cv/ Smallest Hello World program I could write using the Dagger 2 dependency injection framework: https://github.com/ravn/dagger2-hello-world Smallest "Inject configuration strings with @Named" I could write using the Dagger 2 dependency injection framework: https://github.com/ravn/dagger2-named-string-inject-example Adding logging at class load time with instrumentation: An article I wrote way back for java.net to demonstrate what Java agents could help with.

Updated on September 18, 2022

Comments

  • vaquito
    vaquito over 1 year

    I need to disable the Ctrl-Alt-L key combination to use it for IntelliJ (an IDE). I have managed to do it on my desktop computer which currently runs 17.10, but I cannot figure out how to do it on 16.04 which my XPS 13 Developer Edition runs.

    I have found Settings -> Keyboard -> Shortcuts, and disabled the System -> Lock Screen entry. Still locks.

    I tried reassigning to Show/Hide onscreen keyboard. Toggles on screen keyboard and still locks.

    I tried re-reassigning to System -> Lock Screen. Still locks (that was expected though) but now the login dialogue is very simple. A white rectangle with a password field at the top.

    I tried re-disabling it. Same login dialogue as before.

    As the screen does not lock when entering the key in the Shortcuts field, it seems that this is essentially working as designed, but there is a problem with telling the locking process that it should not do anything.

    How should I approach this?

    • Admin
      Admin over 6 years
      I don't have Unity to try it out myself, but it may be an option that can be modified in the unity-tweak-tool application. If you don't have it installed, you can install it with sudo apt install unity-tweak-tool.
    • Admin
      Admin over 6 years
      @Dan Thanks for your suggestion. I could remove the locking, so it just goes blank, but not completely. It sounds like you are on to something, though.
    • Admin
      Admin about 6 years
      @ThorbjørnRavnAndersen have you tried disabling the screensaver here
    • Admin
      Admin about 6 years
      @ukos Thank you for your suggestion. It appears the linked page is for 11.04 and not my 16.04, and the functionality has changed in the five years that have passed.
    • Admin
      Admin about 6 years
      I would recommend, switching to gnome anyway since next LTS will be on gnome and you would search for a new solution then.
    • Admin
      Admin about 6 years
      @ThorbjørnRavnAndersen must be an ubuntu thing. I just tested on debian (gnome) and the shortcut does not exist there. Maybe there is a duplicate assignment somewhere.
    • Admin
      Admin about 6 years
      @ukos I agree. This is why I asked here instead of on the general Unix SE site.
  • vaquito
    vaquito about 6 years
    Thank you. Does this mean that Ctrl-Alt-L is now reported to normal programs?
  • WinEunuuchs2Unix
    WinEunuuchs2Unix about 6 years
    @ThorbjørnRavnAndersen You're welcome. If not assign the keyboard shortcut for Lock Screen to something like Ctrl-Alt-Shift-Z that is never used.
  • vaquito
    vaquito about 6 years
    I tried doing that just now. Does not help - the monitors still blacken out (my guess is that the screen saver still kicks in).
  • WinEunuuchs2Unix
    WinEunuuchs2Unix about 6 years
    @ThorbjørnRavnAndersen Haven't figured out the screen saver problem yet but have added two other options to the answer.
  • vaquito
    vaquito about 6 years
    Thank you. That did it! I suspected something like this, but did not know where to look.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix almost 6 years
    @ThorbjørnRavnAndersen This explains the screen saver issue: askubuntu.com/questions/172447/…