LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xlock

Lock X display with screensaver

TLDR

Lock screen immediately
$ xlock
copy
Lock with specific mode
$ xlock -mode [blank]
copy
Lock with message
$ xlock -message "[Away from desk]"
copy
Lock without password (demo mode)
$ xlock -nolock
copy
Lock with specific timeout
$ xlock -timeout [30]
copy
List available modes
$ xlock -help
copy

SYNOPSIS

xlock [options]

DESCRIPTION

xlock locks the X display until the user enters their password. While locked, the screen displays a configurable animation or pattern, and new X server connections are refused.Multiple display modes provide visual effects during lock. The blank mode simply blacks out the screen, while others show animations like life simulation, mazes, or geometric patterns.The tool blanks the screen, hides the mouse cursor, and requires the user's system password to unlock. All keyboard and mouse input is captured until authentication succeeds.

PARAMETERS

-mode name

Display mode (blank, life, maze, etc.).
-message text
Message to display on lock screen.
-nolock
Demo mode; no password required.
-timeout seconds
Password timeout in seconds.
-echokeys
Echo characters when typing password.
-usefirst
Use first character of password prompt.
-allowaccess
Allow X clients while locked.
-remote
Allow remote locking.

CAVEATS

X11 screen lockers have fundamental security limitations. Consider xsecurelock for higher security needs. Settings like -allowaccess reduce security. May not prevent all bypass methods on X11.

HISTORY

xlock has been part of X11 utilities since the early days of the X Window System. While functional, modern alternatives like xsecurelock address various security concerns inherent to X11's architecture that traditional screen lockers cannot fully mitigate.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid