The KDE desktop environment is highly customizable, including the GUI’s lock screen. The lock screen can be configured and customized via the GUI’s settings menu or from a configuration file via the command line. In this tutorial, you will learn various ways to customize the desktop lock screen in the KDE desktop environment on a Linux system.
In this tutorial you will learn:
- How to configure KDE desktop lock screen via command line and GUI
- How to adjust lock screen timeout
- How to disable or enable auto lock screen
- How to use commands and shortcuts to access lock screen
- How to unlock the KDE lock screen
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro|
|Software||KDE desktop environment|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Adjust lock screen timeout
- To adjust the time it takes for the lock screen to automatically pop up, start by opening the application launcher and navigating to System Settings.
- Then, navigate to the Workspace Behavior tab, followed by Screen Locking.
- From this menu, adjust the time it takes for the screen to automatically lock. Alternatively you can disable the automatic lock completely, and even disable the lock screen from showing up when your computer wakes up.
- Click the Apply button to save your changes, then you can close this menu and the changes will take effect.
Change lock screen wallpaper
- To configure your KDE lock screen wallpaper, once again navigate to System Settings > Workspace Behavior > Screen Locking. In this menu, click on the Configure button under the Appearance section.
- Now select a new wallpaper from the default choices or click on “Add image” to put a custom wallpaper.
- Select your image, click Apply, then close the menu. Afterwards, lock your screen to verify the new change.
If you would rather change the KDE lock screen wallpaper from command line, you can use the following command syntax:
$ kwriteconfig5 --file kscreenlockerrc --group Greeter --group Wallpaper --group org.kde.image --group General --key Image "file:///home/linuxconfig/Pictures/summer.jpg"
Just replace the above file path with the location of your own image file that you wish to use.
Command and shortcuts to access lock screen
- To lock your screen from the command line, execute the following in terminal (note this will only work on distros that have systemd):
$ loginctl lock-session
Another way of accomplishing the same thing, albeit with a much longer and harder to remember command:
$ qdbus org.kde.ksmserver /ScreenSaver org.freedesktop.ScreenSaver.Lock
- You can also use the
Meta + Lkeyboard combination to access the lock screen from anywhere. Note: normally the
Metakey is the one with a Windows logo on most keyboards.
- The third way to access the lock screen is to right click on your desktop and click “Lock Screen.”
Disable or enable auto lock screen
To disable your screen from automatically locking after a period of inactivity or when your computer wakes up from sleep mode, navigate to System Settings > Workspace Behavior > Screen Locking. In this menu, adjust the two settings as seen in the screenshot below:
To disable the lock screen, uncheck both boxes. To enable the lock screen, keep both boxes checked. Apply changes when done and then close the menu.
How to unlock the KDE lock screen
To unlock your KDE lock screen, you will need to move the mouse around or press any key on your keyboard. This will make the password prompt appear.
Once it appears, enter your password and press Enter to unlock your system.
Configure automatic login
To configure automatic login for your KDE desktop, see our dedicated tutorial on KDE auto login to GUI Plasma Desktop.
In this tutorial, we saw how to configure various settings for the KDE desktop lock screen on a Linux system. This included methods from both the GUI and command line, where applicable. As with most things in Linux, we are able to customize and personalize granular settings in order to achieve the ideal result, and the lock screen proves to be no exception.