
Xfce lock screen fails
I like and frequently use the Xfce desktop because of it’s simplicity and relatively small resource footprint. But sometimes, like all things tech, things break. This time the screen wouldn’t lock. Well — it had been working but was no longer.
Some searching revealed this to be an intermittent but fairly common problem for at least several years in the past. Although many of the posts I read indicated that they’d resolved the problem, it wasn’t clear exactly which things that the users tried resulted in a fix. So I decided to experiment a bit and came up with a simple resolution for this problem.
- Determine whether the Xfce screensaver is installed.
- Use the Xfce Settings to ensure that no other screensavers are enabled. Disable them if they are.
- Use the Xfce Settings for the Xfce screensaver and enable both the screensaver and the lock screen.
- Use the Autostart tab of the Session and Startup page of the Xfce Settings Manager to ensure that the Xfce Screensaver is checked so that it will start on login. See Figure 1 to see that and notice that the items in this list are not in any sorted order.

At this point you have two options to enable the screensaver. One is to logout and then to login. This can be an issue if you are working and don’t want to do that.
But the best option in any event is to start the screensaver from the command line. Do this as the non-root user you’re logged in as. Open a terminal and enter the following command at the command line. Be sure to include the ampersand (&) at the end of the command to place the running program in the background.
$ xfce4-screensaver &
This starts the screensaver immediately and the Xfce desktop can be locked immediately. This is not required on reboot or logain after a logout because the screensaver will launch on login.
I suspect the root cause of this problem over the years is an upgrade package that resets one of the Xfce desktop settings. I’ve no way to track that down and really don’t want to spend the time on it anyway.
I hope this helps.