-
Notifications
You must be signed in to change notification settings - Fork 256
GDM Theme
nana-4 edited this page Nov 11, 2018
·
11 revisions
You can change the GDM (lock/login screen) theme by replacing the default GNOME Shell theme.
However if it fails, your desktop environment may not operate correctly. So please be careful if doing this.
- When applying this, other third-party GNOME Shell themes would look broken until you restore to the original theme.
- If GNOME Shell has been updated and restored to the original theme, you will need to install this again.
You need to have the glib-compile-resources
command. The package name depends on the distro:
-
glib2
on Arch Linux -
glib2-devel
on Fedora, openSUSE, etc. -
libglib2.0-dev
on Debian, Ubuntu, etc.
For Ubuntu, you also need the libxml2-utils
package.
- Back up the original theme file. If you are already using a custom GDM theme, skip this:
sudo cp -av /usr/share/gnome-shell/gnome-shell-theme.gresource{,~}
sudo cp -av /usr/share/gnome-shell/theme/ubuntu.css{,~}
sudo cp -av /usr/share/gnome-shell/theme/Yaru/gnome-shell.css{,~}
- Select a GTK+ theme to decide which variant to install.
- Compile and replace the default theme file with the following commands:
GTK_THEME=$(gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g")
cd /usr/share/themes/${GTK_THEME}/gnome-shell
sudo glib-compile-resources --target=/usr/share/gnome-shell/gnome-shell-theme.gresource gnome-shell-theme.gresource.xml
sudo cp -v gnome-shell.css /usr/share/gnome-shell/theme/ubuntu.css
sudo cp -v gnome-shell.css /usr/share/gnome-shell/theme/Yaru/gnome-shell.css
- Reload the theme. If you are running GNOME Shell, press Alt + F2 then type
rt
.
- Restore to the original theme from the backup:
sudo mv -v /usr/share/gnome-shell/gnome-shell-theme.gresource{~,}
sudo mv -v /usr/share/gnome-shell/theme/ubuntu.css{~,}
sudo mv -v /usr/share/gnome-shell/theme/Yaru/gnome-shell.css{~,}
- Reload the theme. If you are running GNOME Shell, press Alt + F2 then type
rt
.