78.4 Locking Screen with LightDM

The LightDM display manager provides dm-tool to allow us to lock the screen from the command line

$ dm-tool lock

On Ubuntu 13.10 (and others), running this command locks the screen and displays the display manager’s login screen. If we use Ctl-Alt-F7 to get back to our desktop we will see a lock screen login prompt. Entering our password there or on the display manager’s login screen will unlock our screen.

Issue Lubuntu 13.10 [140103] Whist the display manager greeter is displayed, Ctl-Alt-F7 takes us back to an unlocked desktop! This can be quite a security issue until fixed. See a work-around below.

A similar command will also lock the screen and switch to the display manager’s login screen.

$ dm-tool switch-to-greeter


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0