Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Change Ubuntu Lock Screen Background

· 4 min read · Home Tech

In this article
  1. Why the Lock Screen Doesn't Match Your Wallpaper
  2. Method 1: Using GNOME Tweaks (Easiest for Most Users)
  3. Method 2: Editing the GNOME Shell Theme (No Extra Software)
  4. Method 3: Using a GNOME Extension (One-Click Solution)
  5. For Older Ubuntu Versions (Unity, 16.04 and Earlier)
  6. Common Problems and How to Fix Them
  7. Frequently Asked Questions

Yes, you can change the Ubuntu lock screen background, and the method depends on your Ubuntu version: versions using GNOME (default since 17.10) require editing a CSS file or using a GNOME extension, while older versions with Unity can use system settings or a simple command. This guide walks you through the current methods, explains why the lock screen often ignores your wallpaper choice, and offers troubleshooting for common issues.

Why the Lock Screen Doesn't Match Your Wallpaper

Many users expect the lock screen to mirror the desktop wallpaper, but Ubuntu's GNOME shell treats them as separate elements. The lock screen background is defined by the gnome-shell-theme.gresource file, which contains the default Ubuntu logo on a dark backdrop. Changing the desktop wallpaper only alters the desktop background, not the lock screen. This separation is intentional for branding and visual consistency, but it confuses users who want a personalized lock screen.

Method 1: Using GNOME Tweaks (Easiest for Most Users)

For Ubuntu 17.10 and later (including 20.04, 22.04, and 24.04), the simplest way is to install the GNOME Tweaks tool and use a shell extension. Here’s how:

  1. Install GNOME Tweaks and the extension manager: sudo apt install gnome-tweaks gnome-shell-extensions
  2. Open Extensions (or the GNOME Extension Manager app) and enable the User Themes extension.
  3. Download a custom GNOME shell theme that includes a lock screen background (sites like gnome-look.org offer many). Extract it to ~/.themes.
  4. Open Tweaks → Appearance → Shell and select the downloaded theme.
  5. Log out and log back in (or restart GNOME Shell with Alt+F2 then r) to see the change.

This method works because the theme overrides the default lock screen background. If you prefer not to install a full theme, you can edit the default theme's CSS directly (see Method 2).

Method 2: Editing the GNOME Shell Theme (No Extra Software)

If you want to keep the default theme but change only the lock screen image, you can edit the theme's CSS file. This requires modifying the gnome-shell.css inside the system theme. Here’s a safe approach:

  1. Copy the system theme to your user directory: cp -r /usr/share/gnome-shell/theme ~/.themes/custom-shell
  2. Edit ~/.themes/custom-shell/gnome-shell.css with a text editor.
  3. Find the #lockDialogGroup section and change the background property to point to your image, e.g., background: #2c2c2c url('file:///home/yourname/Pictures/lock.jpg'); background-size: cover;
  4. Save the file, then enable the custom theme via Tweaks (as in Method 1).

This method gives you full control but requires basic CSS knowledge. Be careful with the file path and ensure the image exists.

Method 3: Using a GNOME Extension (One-Click Solution)

Extensions like Lock Screen Background (available on extensions.gnome.org) let you change the lock screen image without touching system files. After installing the extension, you can simply right-click the desktop and select “Change Lock Screen Background” or use the extension's settings panel. This is the most user-friendly option for non-technical users. However, extensions can break after Ubuntu updates, so you may need to re-enable them.

For Older Ubuntu Versions (Unity, 16.04 and Earlier)

If you’re using Ubuntu 16.04 or earlier with the Unity desktop, the process is different. You can change the lock screen wallpaper by editing the dconf settings:

  1. Install dconf-editor: sudo apt install dconf-editor
  2. Open dconf-editor and navigate to com.ubuntu.user-interface.
  3. Set the background-color or background-image keys to your desired values.

Alternatively, use the command-line tool gsettings to set the com.ubuntu.user-interface schema. This method is deprecated but still works on those systems.

Common Problems and How to Fix Them

  • Change doesn't appear after editing CSS: Ensure you have enabled the custom theme in Tweaks and that the file path in the CSS is correct. Also, restart GNOME Shell (Alt+F2, type r) to reload.
  • Extension not working after update: Check if the extension is compatible with your GNOME version. If not, disable and re-enable it, or wait for an update.
  • Lock screen still shows default after logging out: Some systems cache the lock screen image. Try rebooting instead of just logging out.
  • Image appears stretched or cropped: Use the background-size: cover; property in CSS to ensure the image covers the screen proportionally.

Frequently Asked Questions

Can I use a different image for the lock screen than my desktop wallpaper?

Yes, absolutely. The lock screen and desktop are independent. Using the CSS or extension method, you can set a completely different image for the lock screen. This is useful if you want a privacy-focused lock screen or a different aesthetic.

Will changing the lock screen background affect system performance?

No, changing the lock screen background has no measurable impact on performance. The image is loaded only when the lock screen is displayed, and modern systems handle this easily. Even high-resolution images won't cause lag.

Does this work on Ubuntu 24.04 LTS?

Yes, the methods described work on Ubuntu 24.04 LTS, which uses GNOME 46. The CSS editing method and extensions are still valid. However, always check the extension compatibility with your GNOME version on the extensions website.

What if I want to revert to the default lock screen?

To revert, simply disable the custom theme in Tweaks (set Shell back to “Default”) or uninstall the extension. If you edited the system theme directly, restore the original file from /usr/share/gnome-shell/theme or reinstall the gnome-shell-common package.

Is there a way to change the lock screen background without installing anything?

Yes, you can use the CSS editing method (Method 2) which only requires a text editor and file copying. No additional software is needed, but you must have a basic understanding of file management.