How To Change Libadwaita App Theme In Ubuntu 24.04 (or Linux)
security offer from FOSS Post

Since the introduction of the GTK 4 toolkit for building UI apps on Linux, a library called libadwaita has also been introduced. libadwaita is a set of ready UI components, layouts and stylesheets written in GTK that GNOME app developers (official or not) can directly use rather than writing them from scratch. You could think of it like a framework for building UI apps with GTK.

libadwaita provides a set of nice features for apps that use it. For example, it makes the app “responsive” so that it automatically takes a suitable layout/shape on Linux tablets or phones without further coding from the app developers. It also follows what’s known as “GNOME human interface guidelines” which make the apps written with it more intuitive for end users and have a unified look and feel when run under GNOME.

However, there is a big issue when it comes to libadwaita applications: They ship with their own hardcoded stylesheet by default, so you can no longer change their themes like ordinary GTK applications.

This change was pushed into libadwaita after a group of developers in 2019 signed an open letter telling Linux distribution developers not to theme their apps, saying that they are “breaking” their apps for the end user when they do so. Most of the GNOME and elementary OS folks signed that letter.

Since most distribution developers did not listen, this group of developers took theming power into their own hands and made the stylesheets of their apps hardcoded so that they could no longer be changed using tools like GNOME Tweaks and others. libadwaita applications now basically ship with the Adwaita theme hardcoded into the app.

This is why in the latest Ubuntu 24.04 LTS version, or any other Linux distribution that uses GNOME 45 or GNOME 46, the “GTK theme” option is removed from GNOME Tweaks and is instead changed to “Legacy apps”, indicating that this option will only cause applications using GTK 2, GTK 3 and GTK 4 (the ones not using libadawaita) to change their themes:

How to Change Libadwaita App Theme 5

Most – if not all – GNOME apps have moved to libadwaita in the latest GNOME versions. Since Ubuntu, Fedora and other Linux distributions ship with GNOME by default, then this practically means the end of the themes era on Linux as we knew it before, at least if you wish to keep using GNOME apps.

This is also part of the reason why System76, the company behind the Pop!_OS distribution, have opted to develop their own desktop environment called COSMIC from scratch instead of using their old GNOME-based desktop environment.

It is also why Linux Mint developers have introduced XApps; a set of GNOME applications which are forked from their latest pre-libadwaita versions so that users can continue theming them like ordinary apps.

In any case, and after all of that introductory information, you should know that it is still possible to theme libadwaita apps to a very limited extent. Basically, and using some 3rd-party tools, you can change the colors and gradients of libadwaita apps so that they look more suitable to your taste.

But that’s pretty much about it.

Gradience: Unified System Look with Libadwaita

How to Change Libadwaita App Theme 7

Gradience is a 3rd-party application that makes it easy to change libadwaita colors according to user needs. The application depends on another 3rd-party GTK 3 theme which resembles the Adwaita theme itself, but will make its colors/options tweaked according to the same colors and options that the user chooses in the Gradience application for GTK 4 and libadwaita.

By doing this trick, your GTK 3 applications will be using the modified Adwaita theme that you tweaked, while GTK 4 applications with libadwaita (and without libadwaita) will also be using the modified color palette or options that you made as well.

Additionally, Gradience ships with an option to overwrite the default Flatpak theme for applications as well. Since Flatpak applications are isolated in containers, then they normally will not be themed to the same theme the user selects in GNOME Tweaks. However, Gradience will also apply the modified libadwaita theme to Flatpak applications to make them look like native apps.

This in total creates a unified color theme for all your system applications, just like before.

You would still be limited to the Adwaita theme across all your GTK 3 and GTK 4 apps, and won’t be able to use themes from gnome-look.org, but it is the best that can be achieved at the moment if you plan to use GNOME.

Adwaita GTK 3 Theme Installation

Before installing the Gradience application, you should install the 3rd-party developed Adwaita theme for GTK 3 applications. This is important so that you can get a unified theme across all of your apps.

You can download the latest version of the theme from its GitHub page, or add its corresponding repositories to your system for continuous updates.

For Debian/Ubuntu, the commands would be:

curl -s https://julianfairfax.gitlab.io/package-repo/pub.gpg | gpg --dearmor | sudo dd of=/usr/share/keyrings/julians-package-repo.gpg

echo 'deb [ signed-by=/usr/share/keyrings/julians-package-repo.gpg ] https://julianfairfax.gitlab.io/package-repo/debs packages main' | sudo tee /etc/apt/sources.list.d/julians-package-repo.list

sudo apt install adw-gtk3

For Fedora:

sudo dnf install adw-gtk3-theme

For other Linux distributions, check the GitHub page of the theme.

After you have installed the theme, use GNOME Tweaks to set it as the default theme for your “legacy applications” under the appearance tab:

How to Change Libadwaita App Theme 9

You can now proceed to install Gradience.

Gradience Installation

The Gradience application is available for installation from Flathub as a Flatpak package. You can install it with the following command after you have set up the Flathub repository:

flatpak install flathub com.github.GradienceTeam.Gradience

Run the following commands to make the app capable of theming Flatpak applications:

sudo flatpak override --filesystem=~/.local/share/themes
sudo flatpak override --filesystem=xdg-config/gtk-4.0

When you run the application for the first time, make sure you toggle both of these options:

How to Change Libadwaita App Theme 11

Once opened, you can now use the application to start playing with the color palettes and gradients you want. Make sure you save your modifications first from the icon on the right side of the top bar:

How to Change Libadwaita App Theme 13

And then click the apply button to apply your modifications:

How to Change Libadwaita App Theme 15

You may need to logout and login again to your system for all changes to take effect.

See in the following picture How changing the colors using the Gradience application has an effect on Synaptic package manager which uses GTK 3, GNOME Image Viewer which uses GTK 4 and libadwaita, and Flatseal which uses GTK 4 and libadwaita inside a Flatpak package:

How to Change Libadwaita App Theme 17

Further Theming Options

Gradience has a community where users can share their modified color palettes with other users. You can discover and install these palettes from the application itself:

How to Change Libadwaita App Theme 19

You can apply any one of these however you like.

The “Monet” tab contains some options that allow you to select an image, and then a color palette will be automatically generated out of it according to the most used colors in it:

How to Change Libadwaita App Theme 21

The community interested in the Adwaita theme has also developed the following projects for further integration with other applications. It may be worth it for you to check them out if you want to get an even more unified look and feel across your system:

Conclusion

So this was the only way possible so far to stylize libadwaita applications on Linux. It may be a complex and time-consuming process, and the end result is nowhere near traditional GTK themes on gnome-look.org which used to look much better and more fruitful than the default Adwaita theme.

If you want to keep using these themes just like before, then perhaps you may want to ditch your GNOME desktop for Cinnamon, MATE, Xfce or other GTK-based desktop environments out there. The issue regarding libadwaita-based applications will still persist though, and you will have to replace these applications as well when you make the switch to another desktop environment.

Otherwise, you may end up like this situation on Xubuntu 24.04 where each application looks different:

How to Change Libadwaita App Theme 23
Image via Linux Mint blog.

This fragmentation caused by the GNOME desktop is perhaps why it has fallen to its lowest popularity in years, and the only reason it remains alive today is because it’s the default desktop in Ubuntu and Fedora.

Maybe even that could change in the future when COSMIC desktop is released.

security offer from FOSS Post

Newsletter

Enter your email address to subscribe to our newsletter. We only send you an email when we have a couple of new posts or some important updates to share.

Open Source Directory

Join the FOSS!

Become Part of the Community!

Take a Quiz

Monitor the FOSS World

Comments on this story are now closed.