
On this website, you will find tutorials for installing & managing software, lists of the best linux resources, and in depth guides to linux.
Join us on SlackRobert Washbourne - 2 years ago - themes
To be honest, the default lock screens, also known as greeters or display managers (when the lockscreen also manages the boot login), can leave looks to be desired on pretty much every Linux distribution. To fix that, we have several options - theme the lock screen you already have, change the lock screen, or login automatically and use another option such as i3lock.
This guide shows you how to change the login screen background, edit the login screen font, use a login screen gtk theme, and change your user manager. This guide has sections for most major display managers, but the GDM guide has the most detail.
Typically the easiest option. The options below are for a few of the most popular display managers.
First back up the current theme:
sudo cp -v /usr/share/gnome-shell/gnome-shell-theme.gresource{,~}
Note: Ubuntu 17+ uses a GDM config that is different than the default setup. If the following setup does not work for you please comment and I will try to help. All of the scripts I link below work for me on a fresh Fedora 27 system.
Now you have a few options. If you simply want to change the font on your login manager or change the background, you can use my script:
Download the scripts on the DevPy GitHub: devpytech/scripts/gresource-extract. Then run ./extract.sh
to extract your current theme to the "theme" folder in the same folder as the extract script.
Edit gnome-shell.css
. Change the font to your custom font. E.g:
stage {
font-family: 'Source Sans Pro', Sans-Serif;
font-size: 14px;
color: #eeeeec;
}
Copy a background to the theme folder. Then edit gnome-shell.css
and change the #lockDialogGroup
section to the filename of your image. E.g:
#lockDialogGroup {
background: #2e3436 url(resource:///org/gnome/shell/theme/background.jpg);
background-size: cover;
background-repeat: none;
}
Run the ./build.sh
file from DevPy's GitHub. This will create a .gresource
file in the theme folder.
Finally, override the current gresource (make sure you have backed up the current file):
sudo mv gnome-shell-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource
My result:
My favourite method is to match the GTK theme by building a gresource file.
Here are a few results for themes I have tested:
You can build your own using my script here: devpytech/gtk-gresource.
I've included prebuilt gresource files for the following themes:
Usage:
git clone https://github.com/devpytech/gtk-gresource.git
cd gtk-gresource
# Replace Arc with the theme you want to use
./build.sh Arc
./switch.sh Arc
After a reboot the theme should show on login and lock.
LightDM is probably the second most popular display manager, after GDM. To install a theme, install both lightdm
and lightdm-webkit2-greeter
through your package manager. Then, navigate to /usr/share/lightdm-webkit/themes/
through the terminal or a root file manager and copy the theme files there. Once finished, enable the theme in your /etc/lightdm/lightdm-webkit2-greeter.conf
by setting webkit-theme
.
SDDM is a display manager written from scratch. It's best known for being the default with KDE Plasma 5. To install an SDDM theme, simply move it to /usr/share/sddm/themes/
, making sure that the folder name is the same as the theme name. You can enable a theme by editing /etc/sddm.conf
under the [Theme]
section and changing Current
to the theme name.
Aerial uses gifs on the lockscreen in the style of Apple TV screensavers.
This option will change the way you login ... forever. Or at least until you change back. Once you have installed a display manager, the way you change to it depends on your linux distribution. On Ubuntu, run "sudo dpkg-reconfigure gdm3
" replacing gdm3 with the current display manager.
You can install GDM with the following:
sudo apt install gdm3
sudo dnf install gdm
sudo pacman -S gdm
On other distributions, try searching gdm in the package manager.
You can install GDM with the following:
sudo apt install lightdm
sudo dnf install lightdm
sudo pacman -S lightdm
On other distributions, try searching lightdm in the package manager.
You can install SDDM with the following:
sudo apt install sddm
sudo dnf install sddm
sudo pacman -S sddm
On other distributions, try searching sddm in the package manager.
If you like to login with the console, you can simply disable the Display Manager services:
sudo service gdm disable
sudo service lightdm disable
If you use this option, I suggest that you install a screenlocker / screensaver to help avoid screwing up your monitor (keeping the same image on the monitor for a long time can freeze some pixels).
XScreenSaver ships with most distributions, but if you don't have it, instructions can be found here. Theming is rather rudimentary but you can change the colours by editing ~/.Xresources
.
Probably my favourite screen locker, i3lock is simple and has many derivations to choose from. My favourite derivation is i3lock-colors to customize the look and image.
#!/bin/bash
scrot /tmp/screen.png
xwobf -s 11 /tmp/screen.png
i3lock -i /tmp/screen.png
rm /tmp/screen.png
And that's it! If you want to go back to the defaults, simply re-enable GDM or LightDM.
Thanks for reading. Feel free to share your custom login setup in the comments below.
We don't spam, and we only send emails once or twice a week month.