1080*80 ad

Ubuntu 22.04: Changing Desktop and Login Screen Background

How to Change Your Ubuntu 22.04 Desktop and Login Screen Background

Customizing your operating system’s appearance is one of the best ways to create a more personal and productive workspace. While changing your desktop wallpaper in Ubuntu 22.04 is straightforward, modifying the login and lock screen background requires a few extra steps. This guide will walk you through both processes, giving you complete control over your system’s look and feel.

Changing Your Desktop Wallpaper: The Simple Method

Let’s start with the easiest customization. Your desktop background is the image you see after you’ve logged in. Ubuntu makes changing this incredibly simple through the system settings menu.

Follow these steps to set a new desktop wallpaper:

  1. Open System Settings: Click the system menu in the top-right corner of your screen (where you see network, volume, and power icons) and select Settings. Alternatively, you can right-click anywhere on the desktop and choose “Change Background.”
  2. Navigate to Appearance: In the Settings window, find and click on the Appearance tab in the left-hand navigation pane.
  3. Select a New Background: You will see a selection of pre-installed wallpapers under the Background section. Simply click on an image to instantly apply it. You can also add your own photo by clicking Add Picture… and navigating to the image file on your computer.

This method allows you to quickly personalize your user session, but it does not affect the screen you see before logging in.

Customizing the Login & Lock Screen Background: An Advanced Guide

The login screen (also known as the GDM or GNOME Display Manager screen) is protected by the system, so changing its background requires administrative privileges. This process involves editing a system configuration file.

Important: Before proceeding, understand that you will be modifying a system file. While the process is safe if you follow the instructions carefully, future system updates may overwrite your changes, requiring you to re-apply them.

Step 1: Choose and Position Your Image

First, select the image you want to use for your login screen. For the system to access it properly, the image file should be placed in a system-wide directory. The /usr/share/backgrounds folder is the ideal location.

Open a terminal and use the following command to copy your chosen image, replacing path/to/your/image.jpg with the actual path to your file and your-image-name.jpg with the desired file name.

sudo cp /path/to/your/image.jpg /usr/share/backgrounds/your-image-name.jpg

Using sudo will prompt you for your password, as this action requires administrative rights.

Step 2: Edit the GNOME Shell CSS File

The appearance of the login screen is controlled by a CSS (Cascading Style Sheet) file. We need to edit this file to point to our new background image.

The file we need to modify is located at: /usr/share/gnome-shell/theme/Yaru/gnome-shell.css

Open this file with a text editor using root permissions. We recommend using nano, a simple command-line editor.

sudo nano /usr/share/gnome-shell/theme/Yaru/gnome-shell.css

Step 3: Modify the Lock Screen Background Property

Inside the nano editor, you need to find the specific CSS rule that controls the login screen. Use the search function (Ctrl + W) and type #lockDialogGroup to find the correct section.

You will see a block of code that looks like this:

#lockDialogGroup {
  background: url(resource:///org/gnome/shell/theme/Yaru/assets/noise-texture.png);
  background-repeat: repeat; 
}

This is the part we need to change. Modify the background line to point to the image you copied in Step 1. Ensure you include the file:// prefix before the path.

Your modified code block should look like this:

#lockDialogGroup {
  background: url(file:///usr/share/backgrounds/your-image-name.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; 
}

Pro Tip: Adding background-size: cover; and background-position: center; will help ensure your image scales correctly to fill the screen without distortion.

Step 4: Save and Exit

After making the changes, save the file and exit the editor.

  • In nano, press Ctrl + O to write the changes, then press Enter to confirm.
  • Press Ctrl + X to exit.

To see your new login screen, you can either reboot your system or log out of your current session. The next time you see the login prompt, it will be displayed over your custom background image.

A Crucial Note on System Updates

As mentioned earlier, system software updates, particularly for the gnome-shell package, can overwrite the gnome-shell.css file, reverting your custom background to the default.

To prepare for this, it’s a good security and maintenance practice to:

  • Keep a backup of your chosen background image in a safe place.
  • Bookmark this guide or keep a note of the file path and CSS changes so you can quickly re-apply them after a major system update.

By following these steps, you can fully customize the look and feel of your Ubuntu 22.04 system, creating a more professional and personalized environment from the moment you boot up.

Source: https://kifarunix.com/change-desktop-and-login-screen-background-on-ubuntu/

900*80 ad

      1080*80 ad