12

I am looking a simple way to lock my session in Xfce (Debian Unstable). I don't want to have to write my password at every wake-up but I want to be able to press to a shortcut (which launches a commandline) which asks for identification.

The usage is to lock my laptop when I leave office for lunch. I want to press this shortcut before closing the screen (and so putting the laptop to suspend). If someone tries to wake it up, he will have to enter the password.

  • Short answer : xscreensaver-command -lock. See accepted answer for different possibilities. – ppr Dec 18 '13 at 15:22
11

I found these methods on Ubuntu Forums in a thread titled: Thread: How do I lock the screen in XFCE?.

excerpted from 2 of the answers in that thread

Method #1 - Keyboard shortcut

Open the settings manager > keyboard > shortcuts and you can see that the default shortcut to lock the screen is ctrl-alt-del. If you want to change it, click add on the left, type in a name for your list of shortcuts, (widen the window so you can see the whole thing) select xflock4 shortcut on the right and enter the new key combo.

Method #2 - via command line

    $ xflock4

Method #3 - xscreenlock

Most of the time I use xscreenlock on a multitude of Linux distros. It's fairly ubiquitous.

excerpt from developers website

XScreenSaver is the standard screen saver collection shipped on most Linux and Unix systems running the X11 Window System. I released the first version in 1992. I ported it to MacOS X in 2006, and to iOS in 2012.

On X11 systems, XScreenSaver is two things: it is both a large collection of screen savers; and it is also the framework for blanking and locking the screen.

On MacOS systems, these screen savers work with the usual MacOS screen saving framework (X11 is not required).

On iOS devices, it is an application that lets you run each of the demo modes manually.

screenshot of main dialog

    ss of dialog

. There is a ton of screenshots of the various screensavers and Xscreensaver also provides screen locking as well.

  • In XFCE-Fedora: CTRL-ALT-l – markusN Jan 18 at 14:30
3

I use xscreensaver for this. Locking with:

$ xscreensaver-command -l
  • 1
    The correct command for my system is xscreensaver-command -lock – ppr Dec 18 '13 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.