Login themes for linux

How do I change login screen theme or background in Ubuntu 20.04?

How can I change the Ubuntu 20.04 login screen theme or background? In the previous version 19.10, I can change it from the CSS file under Yaru theme but now there is no CSS file.

The answer is to install vanilla-gnome-default-settings. This will set the GDM theme to Gnome stock, and also give you the option of continuing to use Yaru as your theme or the stock stock Gnome theme.

I haven’t tested this on 20.04, but I believe my answer here for how to do this on 21.10 should work on 20.04, and it doesn’t require installing any third-party scripts or extracting gresource files: askubuntu.com/a/1396066/84581

3 Answers 3

In previous versions of Ubuntu since its introduction of gdm3 for login greeter, the style sheet file is directly available to edit.

/usr/share/gnome-shell/theme/ubuntu.css #for Ubuntu 18.04 /usr/share/gnome-shell/theme/Yaru/gnome-shell.css` #for Ubuntu 19.10 

are the files being used as alternatives.

The name of alternatives is gdm3.css .

for Ubuntu 20.04 the equivalent to above is gdm3-theme.gresource

$ update-alternatives --config gdm3-theme.gresource There are 3 choices for the alternative gdm3-theme.gresource (providing /usr/share/gnome-shell/gdm3-theme.gresource). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource 15 auto mode 1 /usr/local/share/gnome-shell/theme/focalgdm3.gresource 0 manual mode 2 /usr/share/gnome-shell/gnome-shell-theme.gresource 10 manual mode 3 /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource 15 manual mode Press to keep the current choice[*], or type selection number: 

from the core files of Ubuntu, the config for gdm is

stylesheetName: 'gdm3.css', themeResourceName: 'gdm3-theme.gresource', 

the above means that one needs to edit the file gdm3.css inside the .gresource file from the above update-alternatives result. Or install some other .gresource files which have the compatibility for Ubuntu 20.04. for example in above output you have the choice of

. /gnome-shell/gnome-shell-theme.gresource 

as an alternative. If you trust some other (external sources) .gresource files that have the compatibility for Ubuntu 20.04, You can install them as an alternative and use it.

for example, you can extract the gdm3.css and see the color that is configured for login screen background.

run the below commands one by one

gresource extract /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource /org/gnome/shell/theme/gdm3.css > $HOME/gdm3.css gedit $HOME/gdm3.css 

Editing this content with your required content and recompiling it to create new .gresource file is required. After which you can install this new .gresource file as an alternative and select it.

How to extract and compile?

Disclimer: this link is only for Idea. Proper making and configuration is required for getting things to work for Ubuntu 20.04 Otherwise system will be bricked. Please note that this post is quite older and contents vary from Ubuntu 20.04.

Читайте также:  Linux ulimit all users

Also note that the package libglib2.0-dev is required to compile the .gresource file.

Well, seems the process is very heavy just for changing the login screen background, rite? what if you want to change the background Image or color of the Login screen frequently?

Workaround
for changing login background with Image/ Color/ Gradient Horizontal/Vertical with a script.

you can download the ubuntu-gdm-set-background file via command line

wget -qO - https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background/archive/main.tar.gz | tar zx --strip-components=1 ubuntu-gdm-set-background-main/ubuntu-gdm-set-background 

Once you downloaded the script ubuntu-gdm-set-background .

Make sure you have installed the required package, libglib2.0-dev-bin .
If not installed, Install it with the command

sudo apt install libglib2.0-dev-bin 

background with image
background with color
background with gradient horizontal ( requires two valid hex color inputs)
background with gradient vertical ( requires two valid hex color inputs)

tip: be ready with valid hex color code in place of below example like #aAbBcC or #dDeEfF . Change them to your preferred hex color codes. you may choose colors from https://www.color-hex.com/

sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg sudo ./ubuntu-gdm-set-background --color \#aAbBcC sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF sudo ./ubuntu-gdm-set-background --reset ./ubuntu-gdm-set-background --help 

try Ctrl + Alt + F1 to go the gdm screen to see the change.

If change does not appear, then restart gdm with below command

sudo systemctl restart gdm 

Источник

The Best Linux Lockscreen

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.

Theming your lockscreen

Typically the easiest option. The options below are for a few of the most popular display managers.

GDM Display Manager

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:

Читайте также:  Linux man page command

Editing the current theme

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.

Editing the font

Edit gnome-shell.css . Change the font to your custom font. E.g:

Editing the background

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:

Building & enabling

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 

Custom Lockscreen

Using your GTK Theme

My favourite method is to match the GTK theme by building a gresource file.

Here are a few results for themes I have tested:

Arc

Arc theme lockscreen

Pop

Pop theme lockscreen

Vertex

Vertex theme lockscreen

You can build your own using my script here: devpytech/gtk-gresource.

I’ve included prebuilt gresource files for the following themes:

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 Display Manager

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 .

Источник

How To Change The GDM3 Login Screen (Greeter) GTK Theme And Background Image Using gdm-tools

Using gdm-tools, you’ll be able to easily change the GDM login screen (greeter) theme and background image, backup / restore the default GDM theme and optionally reset everything to default, and extract the default GDM theme for use in «weird» GNOME sessions, such as the Ubuntu session.

Not sure what’s this GDM login screen / greeter? Here’s a screenshot:

GDM3 login screen greeter

Not all GTK themes are compatible with GDM. To be able to use a GTK theme as your GDM login screen theme, you’ll need to make sure the theme is installed in /usr/share/themes and that it contains a gnome-shell subdirectory with a valid GNOME Shell theme (a valid gnome-shell.css file).

It’s worth noting that gdm-tools is new, and it probably hasn’t been widely tested. So use it with care and at your own risk! Using the wrong GDM settings may prevent you from logging in to your Linux desktop.

The developer recommends using only one tool to change the GDM login screen theme, since each such tool creates a different backup of the original GNOME Shell gresource file. In this regard, gdm-tools is smarter than other such tools, using a dual backup system which should avoid running into issues.

Читайте также:  Dial in server linux

It’s also worth mentioning that a GNOME Shell update will revert the custom theme you set for the GDM login screen / greeter, to its default (to use a custom GDM theme, the gnome-shell-theme.gresource file needs to be replaced, and this file is overwritten by GNOME Shell updates). So when this happens, you’ll need to apply the theme again using gdm-tools.

All this information about the dual backup system, etc., is not available on the gdm-tools GitHub page. However, everything is explained in the gdm-tools man page, so you can check it out after installing this, using man set-gdm-theme , or online here.

gdm-tools installation

Let’s get started with gdm-tools installing it. For Arch Linux / Manjaro, you can directly install gdm-tools from AUR.

sudo apt install libglib2.0-dev dconf-cli git
sudo dnf install glib2-devel dconf git

For other Linux distributions you’ll need to figure out the package names for GLIB 2.0 (development headers), and dconf-cli, and install them.

Next, clone the gdm-tools Git repository and install it using:

git clone --depth=1 https://github.com/realmazharhussain/gdm-tools.git

cd gdm-tools

./install.sh

In case you later want to uninstall gdm-tools, use the uninstall.sh script from the cloned GitHub repository.

Using gdm-tools to change the GDM3 login screen theme and background image

Before using gdm-tools to change your GDM login screen or wallpaper, make a backup of the default theme by using:

set-gdm-theme backup update

Now let’s list all the available valid GDM login screen themes:

Warning for Ubuntu users: the theme called «default» in the set-gdm-theme list command output is the default GNOME Shell theme (Adwaita), and not Yaru. If you attempt to change the background image only (see below), the GTK theme will also be switched to «default», which is the GNOME Shell Adwaita theme!

To set one of the themes listed above for your GDM login screen / greeter, use:

For example, to set Yaru-light as the GDM3 theme, you’d use:

set-gdm-theme set Yaru-light

Don’t have any themes installed that support GDM3? Try Orchis or WhiteSur (run the install script with sudo , because the theme has to be installed to /usr/share/themes to use it as a GDM greeter theme).

Set the background image of your GDM3 login screen using:

You can set both the GDM greeter theme and background image in one go, using:

set-gdm-theme set [/path/to/background/image.png]

For example, set Yaru-light as the GTK theme used by the GDM login screen, and /usr/share/backgrounds/warty-final-ubuntu.png as its background image:

set-gdm-theme set Yaru-light /usr/share/backgrounds/warty-final-ubuntu.png

If you wish to restore a GDM3 theme backup, use:

set-gdm-theme backup restore

Or, if you want to reset everything to the original state, use:

For more on this, check out the help of both scripts ( set-gdm-theme -h and gnomeconf2gdm -h , as well as man set-gdm-theme ).

Источник

Оцените статью
Adblock
detector