Software & AppsOperating SystemLinux

How To Change Window Title Bar Color in Ubuntu 18.04 GNOME

Ubuntu 14

In this article, we will guide you through the process of changing the window title bar color in Ubuntu 18.04 GNOME. This process can be done by either editing the gtk.css file or using Gnome Tweaks.

Quick Answer

To change the window title bar color in Ubuntu 18.04 GNOME, you can either edit the gtk.css file or use Gnome Tweaks. Editing the gtk.css file allows you to customize the colors manually, while using Gnome Tweaks provides a more user-friendly interface with pre-defined themes to choose from.

Prerequisites

Before we begin, make sure you have administrative access to your Ubuntu 18.04 GNOME system.

Method 1: Editing the gtk.css File

Step 1: Open the gtk.css File

Open a terminal and run the following command to open the gtk.css file in the nano text editor:

nano ~/.config/gtk-3.0/gtk.css

In this command, nano is a text editor, ~/.config/gtk-3.0/gtk.css is the path to the gtk.css file.

Step 2: Add Custom CSS Code

Add the following code to the file:

.titlebar {
 background: #3089FF;
 color: white;
}

.titlebar:backdrop {
 background: #777777;
 color: white;
}

This code will change the active title bar background color to a blue color (#3089FF) and the inactive title bar background color to a gray color (#777777). The text color will be set to white.

Step 3: Save and Exit

Save the file and exit the text editor.

Step 4: Refresh GNOME

Refresh GNOME by running the following command in the terminal:

setsid gnome-shell --replace

In this command, setsid is a utility that runs a program in a new session, gnome-shell --replace is a command to replace the current GNOME shell with a new one.

Method 2: Using Gnome Tweaks

Step 1: Install Gnome Tweaks

Install Gnome Tweaks by running the following command in the terminal:

sudo apt install gnome-tweaks

In this command, sudo is a command that allows you to run programs with the security privileges of another user (by default, the superuser), apt install gnome-tweaks is a command to install Gnome Tweaks.

Step 2: Open Gnome Tweaks

Open Gnome Tweaks and go to the “Appearance” tab.

Step 3: Choose a Different Theme

Under the “Themes” section, choose a different theme that includes customization options for the title bar color, such as Adwaita.

The title bar color will be changed according to the selected theme.

Conclusion

By following the steps above, you can easily change the window title bar color in Ubuntu 18.04 GNOME. Please note that these solutions may vary depending on the version of Ubuntu and the desktop environment being used. If you have any questions or encounter any issues, feel free to leave a comment below.

Can I change the window title bar color in Ubuntu 18.04 GNOME?

Yes, you can change the window title bar color in Ubuntu 18.04 GNOME by either editing the gtk.css file or using Gnome Tweaks.

What are the prerequisites for changing the window title bar color?

Before changing the window title bar color, make sure you have administrative access to your Ubuntu 18.04 GNOME system.

How can I edit the `gtk.css` file?

To edit the gtk.css file, open a terminal and run the command nano ~/.config/gtk-3.0/gtk.css. This will open the gtk.css file in the nano text editor.

What code should I add to the `gtk.css` file to change the title bar color?

You can add the following code to the gtk.css file:

.titlebar {
 background: #3089FF;
 color: white;
}

.titlebar:backdrop {
 background: #777777;
 color: white;
}

This code will change the active title bar background color to a blue color (#3089FF) and the inactive title bar background color to a gray color (#777777). The text color will be set to white.

How can I save and exit the `gtk.css` file in nano?

To save and exit the gtk.css file in nano, press Ctrl + X to exit, then press Y to save the changes, and finally press Enter to confirm the file name.

How can I refresh GNOME after editing the `gtk.css` file?

To refresh GNOME after editing the gtk.css file, run the command setsid gnome-shell --replace in the terminal.

Can I change the window title bar color using Gnome Tweaks?

Yes, you can change the window title bar color using Gnome Tweaks. Install Gnome Tweaks by running sudo apt install gnome-tweaks in the terminal, open Gnome Tweaks, go to the "Appearance" tab, and choose a different theme that includes customization options for the title bar color.

Are these solutions applicable to all versions of Ubuntu and desktop environments?

These solutions may vary depending on the version of Ubuntu and the desktop environment being used. It is recommended to check the specific documentation or support resources for your version and desktop environment for accurate instructions.

Leave a Comment

Your email address will not be published. Required fields are marked *