Question

Is there a lock screen on Linux-based systems?

When the screen is locked, the user should enter a PIN code to enter back. Like the PIN screen lock on an iPhone.

Was it helpful?

Solution

I don't know if you are looking for a tool or library to do this. There are quite a few DE independent options:

  1. xlock
  2. slock

They are opensource so you can take a look at code if you are looking for a programatic way to do this.

For library you can look at xlib for all interaction with X. XLockDisplay is the function that you might want to use.

OTHER TIPS

Gnome Desktop:

gnome-screensaver-command -l

What this actually does (source code) is call a DBUS Api that aims to be desktop-neutral. Read more about that on this page

Often you have that choice in the screen saver. Then the computer will be locked after a specific time that you decide. You have it in Ubuntus screen saver.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top