How to Change the Login Screen and Lock Screen Background in Ubuntu

Personalising an Ubuntu desktop workstation with custom wallpapers, vibrant icon themes, and sleek fonts provides a satisfying daily experience. However, when you boot up your computer or switch user accounts, Ubuntu displays a plain, austere grey or solid purple background behind the GNOME Display Manager (GDM) login prompt. While Ubuntu’s Settings app easily changes the desktop wallpaper, modifying the system-level GDM login background requires administrative tools because GDM operates in an isolated system session before user environments load.

Desktop Wallpaper vs. GDM Login Screen

In the GNOME desktop environment:

  • Lock Screen: When you lock your active session (Super + L), Ubuntu automatically displays your personal desktop wallpaper overlaid with a soft blur.
  • Login Screen (GDM): The initial greeter screen presented when booting up or switching users is controlled by GNOME’s compiled GResource stylesheet (gdm-theme.gresource), which uses hardcoded solid background colours by default.

The Safest Method: Using the GDM Background Utility

Because manually editing compiled binary GNOME stylesheets can cause display crashes if formatting errors occur, the Ubuntu open-source community maintains an audited, dedicated configuration tool called GDM Background:

  1. Press Ctrl + Alt + T to open the Terminal.
  2. Download the safe, single-script GDM customiser utility:
    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
  3. Make the script executable:
    chmod +x ubuntu-gdm-set-background

Setting a Custom Image as Your Login Wallpaper

To assign any high-definition photograph or abstract artwork to your boot screen:

  1. Locate the full file path of your image (for example, ~/Pictures/Wallpaper.jpg).
  2. Run the configuration tool with administrative root privileges:
    sudo ./ubuntu-gdm-set-background --image ~/Pictures/Wallpaper.jpg
  3. Enter your administrator account password.
  4. The script decompiles GDM’s CSS framework, writes your image asset, and recompiles the system theme cleanly in under 5 seconds.
  5. Test your new aesthetic immediately: click the top-right panel, choose Log Out or Switch User. Your custom wallpaper will render behind the login avatar and password field.

Setting a Custom Solid Colour or Horizontal Gradient

If you prefer a sleek, minimalist single colour or two-tone gradient over a photograph:

  • Solid Colour: Run sudo ./ubuntu-gdm-set-background --color #1e1e2e (using any hex colour code).
  • Gradient: Run sudo ./ubuntu-gdm-set-background --gradient horizontal #0f2027 #203a43.

How to Restore Factory Ubuntu Defaults

If you ever upgrade Ubuntu or wish to restore the original out-of-the-box look:

sudo ./ubuntu-gdm-set-background --reset

Ubuntu instantly restores its default stylesheet without requiring a reboot.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.