10.4. Customizing the Login Screen
The GNOME Login Screen has several elements that can be customized. These changes can only be performed by a system administrator and affect all users. This section describes how to customize the greeter text, logo, keyboard layout, and user list.
10.4.1. Adding a Greeter Logo
The greeter logo on the login screen is controlled by the
org.gnome.login-screen.logo
GSettings key. Since GDM
uses its own dconf
profile, you can add a greeter logo by changing the settings in that profile.
For more information about GSettings and
dconf
, see Chapter 9, Configuring Desktop with GSettings and dconf.
When choosing an appropriate picture for the logo to your login screen, consider the following picture requirements:
- All the major formats are supported: ANI, BPM, GIF, ICNS, ICO, JPEG, JPEG 2000, PCX, PNM, PBM, PGM, PPM, GTIFF, RAS, TGA, TIFF, XBM, WBMP, XPM, and SVG.
- The size of the picture scales proportionally to the height of 48 pixels. So, if you set the logo to 1920x1080, for example, it changes into an 85x48 thumbnail of the original picture.
Procedure 10.6. Adding a logo to the login screen
- Create or edit the
gdm
profile in/etc/dconf/profile/gdm
which contains the following lines:user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults
gdm
is the name of adconf
database. - Create a
gdm
database for machine-wide settings in/etc/dconf/db/gdm.d/01-logo
:[org/gnome/login-screen] logo='/usr/share/pixmaps/logo/greeter-logo.png'
Replace /usr/share/pixmaps/logo/greeter-logo.png with the path to the image file you want to use as the greeter logo. - Update the system databases:
#
dconf update
Next time you log in, the screen will show with the new login logo.
Note
What if the Logo Does Not Update?
Make sure that you have run the
dconf update
command as root to update the system databases. In case the logo does not update, try restarting GDM
. For more information, see Section 14.1.1, “Restarting GDM”.
10.4.2. Displaying a Text Banner
The text banner on the login screen is controlled by the following GSettings keys (for more information about GSettings, see Chapter 9, Configuring Desktop with GSettings and dconf):
org.gnome.login-screen.banner-message-enable
- enables showing the banner message.
org.gnome.login-screen.banner-message-text
- shows the text banner message in the login window.
Note that since
GDM
uses its own dconf
profile, you can configure the text banner by changing the settings in that profile.
Procedure 10.7. Displaying a Text Banner on the Login Screen
- Create or edit the
gdm
profile in/etc/dconf/profile/gdm
which contains the following lines:user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults
gdm
is the name of adconf
database. - Create a
gdm
database for machine-wide settings in/etc/dconf/db/gdm.d/01-banner-message
:[org/gnome/login-screen] banner-message-enable=true banner-message-text='Type the banner message here'
Note
There is no character limit for the banner message. GNOME Shell autodetects longer stretches of text and enters two column mode. However, the banner message text cannot be read from an external file. - Update the system databases:
#
dconf update
The banner text appears when you have selected yourself from the user list or when you start typing into the box. The next time you log in you will see the text when inserting the password.
10.4.2.1. What if the Banner Message Does Not Update?
If the banner message does not show, make sure you have run the
dconf update
command.
In case the banner message does not update, try restarting
GDM
. For more information, see Section 14.1.1, “Restarting GDM”.
10.4.3. Displaying Multiple Keyboard Layouts
You can add alternative keyboard layouts for users to chose from on the login screen.
This can be helpful for users who normally use different keyboard layouts from the default and who want to have those keyboard layouts available at the login screen. Nevertheless, the selection only applies when using the login screen. Once you are logged in your own user settings take over.
Procedure 10.8. Changing the System Keyboard Layout Settings
- Find the codes of the required language layouts in the
/usr/share/X11/xkb/rules/base.lst
file under the section named! layout
. - Use the
localectl
tool to change the system keyboard layout settings as follows:$
localectl set-x11-keymap layout
You can specify multiple layouts as a comma-separated list. For example, to setes
as the default layout, andus
as the secondary layout, run the following command:$
localectl set-x11-keymap es,us
- Log out to find that the defined layouts are available at the top bar on the login screen.
Note that you can also use the
localectl
tool to specify the machine-wide default keyboard model, variant, and options. See the localectl
(1) man page for more information.
10.4.4. Disabling the Login Screen User List
You can disable the user list shown on the login screen by setting the
org.gnome.login-screen.disable-user-list
GSettings key.
When the user list is disabled, users need to type their user name and password at the prompt to log in.
Procedure 10.9. Setting the org.gnome.login-screen.disable-user-list Key
- Create or edit the
gdm
profile in/etc/dconf/profile/gdm
which contains the following lines:user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults
gdm
is the name of adconf
database. - Create a
gdm
database for machine-wide settings in/etc/dconf/db/gdm.d/00-login-screen
:[org/gnome/login-screen] # Do not show the user list disable-user-list=true
- Update the system databases by updating the
dconf
utility:#
dconf update