Ugly lock screen in Xubuntu

when I lock my screen, I don’t get the nice login dialog which is present after my laptop reboot. I get something ugly similar to this:

enter image description here

I googled this picture, it is not exact screenshot, but it is almost the same. How can I fix this? Is it standard behaviour or did I break something? The picture of burning screen scares me, but I repeat myself “Don’t panic!” and it kinda helps a little.

  • It is ugly.
  • It does not look like the 99% of my environment.
  • I use multiple keyboard layouts. When typing password, I need to see which one is active, because otherwise I make typos in my password and have to try login multiple times. With this screen, I usually end up in exactly 3-5 tries, as I make wrong guesses and other accidental typos caused by nervousness.
  • Why is it called XScreenSaver? I disabled screensavers. I hate them. I want only to lock my computer while I go to bathroom or for a lunch. I want my login screen.
Asked By: Honza Javorek


Xscreensaver is a package which is an extensible screen saver framework, and locks the computer.

According to this page.

The XScreenSaver is a modular screen saver and locker for the X Window
System. It is highly customizable and allows the use of any program
that can draw on the root window as a display mode. The purpose of
XScreenSaver is to display pretty pictures on your screen when it is
not in use, in keeping with the philosophy that unattended monitors
should always be doing something interesting, just like they do in the
movies. However, XScreenSaver can also be used as a screen locker, to
prevent others from using your terminal while you are away.

I don’t know the reason why it is used in Lubuntu and Xubuntu, but it might be because of the its popularity, stability, and probably it is light weight.

It also reduces the burden of building a new package to replace already existing software.

Answered By: green

Remove xscreensaver and install gnome-screensaver which has a more polished look:

sudo apt-get remove xscreensaver
sudo apt-get install gnome-screensaver

You can also set a shortcut to lock the screen with the keyboard:

Start > Settings Manager > Keyboard > Application Shortcuts > Add

Command: xflock4

ShortCut: <Super>l ; (e.g. press the "Windows key" + l)

NOTE: The only potential downside to this is that gnome-screensaver will pull the gnome dependencies which in a very minimalistic desktop might not already be present. But on most average systems the gnome libraries are already installed anyway so there is no overhead.

Answered By: ccpizza

Do you like black? Try slock, it’s the best example of the KISS principle.

To install it: sudo apt-get install suckless-tools

Then, the easiest way to configure it in xubuntu is: sudo apt-get remove xscreensaver

This is because by default xscreensaver takes precedence over other screensavers, slock among them. Once removed, you can either kill the xscreensaver thread already running in background or just restart.

Enjoy simplicity.

Answered By: user132541

It’s a bit easier to use the stock “White on Black” or “Black on Black” lock screens in X/Ubuntu 18.04.2 LTS using xfce4. This also applies to xfce4 installed on top of Ubuntu without the xubuntu-desktop package.

Package xscreensaver-data contains the default “White on Black” theme at /etc/X11/app-defaults/XScreenSaver.

Package xubuntu-default-settings contains /etc/skel/.Xdefaults, copied to ~/.Xdefaults during creation of any user account, which contains the “Black on Black” theme.

/etc/xdg/xfce4/xinitrc loads ~/.Xdefaults with code:

 # Has to go prior to merging Xft.xrdb, as its the "Defaults" file
 test -r "/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/xfce4/Xft.xrdb"
 test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"

 # ~/.Xresources contains overrides to the above
 test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"

To go back to default, delete ~/.Xdefaults.

To use the dark theme, use a command like:

 (mkdir -p /tmp/xubuntu-default-settings && cd /tmp/xubuntu-default-settings && apt download xubuntu-default-settings && dpkg -x xubuntu-default-settings*.deb . && cp etc/skel/.Xdefaults $HOME/)


 deb=xubuntu-default-settings ; apt download "$deb" && ar x "$deb"*.deb data.tar.xz && tar -C $HOME/ -xJf data.tar.xz ./etc/skel/.Xdefaults --strip-components=3 && rm data.tar.xz "$deb"*.deb

Use ~/.Xdefaults as a simple way to retheme the xscreensaver lock-screen based on the contents of the files previously noted.

Answered By: noabody
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.