19

I want to have a hot corner that will immediately (and reliably) load my lock screen. Any suggestions?

pomsky
  • 68,507
Shamoon
  • 293

3 Answers3

50

First you need to install a GNOME shell extension called CustomCorner to be able to activate hot-corners.

Then open the extension's preferences and choose a corner, and select 'Run Command'.
enter image description here

In the command box, use the following

dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock

Alternatively, you can use

gnome-screensaver-command --lock

if you have the gnome-screensaver package installed.

pomsky
  • 68,507
27

For what it is worth:

Super+L (Super is the Windows key on PC, or the command key on Macs) locks your screen.

I always have the screen blanker off, but it still activates as I press these keys.


System Settings > Brightness & Lock:

Turn screen off when inactive for: Never.

Lock: ON
Lock screen after: 30 seconds.

[v] Require my password when waking from suspend.

Hannu
  • 5,374
  • 1
  • 23
  • 40
  • 27
    It says nothing about the hot corner part, the feature OP is looking for. – pomsky Jun 05 '19 at 14:55
  • 5
    Yes? And how come this would not be still a valid answer? Maybe OP didn't know about this. – Hannu Jun 05 '19 at 15:06
  • 4
    Thanks @Hannu - you are correct in that I did not know about this. Makes the hot corners no longer needed – Shamoon Jun 05 '19 at 15:30
  • 21
    +1 for addressing the XY problem, though in spirit of SE perhaps the other answer should be the accepted one. – BlueBuddy Jun 05 '19 at 22:52
  • 7
    -1 for not answering the question asked. – Reinier Post Jun 06 '19 at 15:22
  • 2
    @ReinierPost Hannu went above and beyond by answering the real problem instead of sticking to the information provided. It's risky if it turns out you're wrong, but since in this case it was exactly what OP wanted, hardly downvote worthy. – Mast Jun 07 '19 at 11:06
  • 2
    I disagree. This content is in here for you and me, not just for the OP. Questions and answers must match so we can effectively find the answers to our questions. – Reinier Post Jun 07 '19 at 13:09
  • FWIW: I absolutely hate the display corner tricks in Windows, "Shutdown" being the top issue; hunting that one in a Virtual machine that runs in a window is repulsive. – Hannu Jun 25 '19 at 16:37
  • I find it a bit amusing how hard some people have to accept that there actually exists solutions to problems that might bring you outside what you might expect at first. WHY would you NOT include those as valid answers? – Hannu Apr 16 '20 at 21:06
16

For what it's worth:

In Kubuntu 18.04 (Ubuntu with the KDE 5 desktop), this is built in:

System Settings > Workspace - Desktop Behaviour > Screen Edges - each of the screen edges and corners can be set to various actions one of which is Lock screen.

Joe P
  • 523