From ef494d8fb71b1464443ca4f11d2c1a2aa2584b13 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 22 Feb 2025 06:28:04 +0100 Subject: [PATCH] xorg: added guide to automatically lock the screen --- wiki/linux/x_window_system.md | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/wiki/linux/x_window_system.md b/wiki/linux/x_window_system.md index 957ad6d..75ba49d 100644 --- a/wiki/linux/x_window_system.md +++ b/wiki/linux/x_window_system.md @@ -10,6 +10,30 @@ It is maintained by the [X.Org Foundation](https://x.org/wiki/). This section addresses various usages of the X Window System. +### Screen Locker + +The X Window System allows various screen lockers to be used. +One of them is `slock` by [suckless](/wiki/linux/suckless.md). +This will stand in as a screen locker for this section. +The screen can be run by simply running the following command. + +```sh +slock +``` + +By default this will not be run automatically when the computer goes into sleep. +This can be changed by installing and using `xss-lock` like the following example shows. + +```sh +xss-lock -- slock & +``` + +Run this command at startup if the automatic locking is wanted. + +In this context it can be useful to enable the screensaver or set the computer to automatically go +to sleep after a certain amount of time. +For this navigate to the [corresponding section](#turning-off-the-screen). + ### Kill Windows Windows can be killed with the utility `xkill`. @@ -86,6 +110,18 @@ Section "ServerFlags" EndSection ``` +Another option to do this is by using the command `xset`. +An example for this are the follwing commands which will enable the screensaver to act upon 10 +minutes of inactivity. + +```sh +xset s on +xset s 600 +``` + +For more informations on this visit the +[Arch wiki](https://wiki.archlinux.org/title/Session_lock#DPMS). + ##### Adjust DPI and UI Scale The dots per inch (DPI) is a measurement of spatial video dot density.