23

Back on 21.10, just picking whichever theme, dark or not, in GNOME Tweaks, set the desktop to that theme.

Now on 22.04, due to the switch of some apps to libadwaita I assume, you need to set Dark/Light mode in the Appearance section of the system Settings for it to register (whether for GTK3 or GTK4 apps). The problem is, the Appearance section isn't available when using the GNOME session, that is to say not the default Ubuntu one but the "base" GNOME session without Ubuntu modifications. Probably because the system ships with version 41.4 of the control center and not version 42.

I can set it using this command:

gsettings set org.gnome.desktop.interface color-scheme prefer-dark

But surely there has to be a way to do so in UI? If not, that's a really poor user experience to have in a LTS release...

2 Answers2

25

I have created two command aliases for switching themes, one for light, and one for dark. It switches everything.

//dark
alias dark='gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark \
&& gsettings set org.gnome.desktop.interface color-scheme prefer-dark'
//light
alias light='gsettings set org.gnome.desktop.interface gtk-theme Adwaita \
&& gsettings set org.gnome.desktop.interface color-scheme prefer-light'

Ivan V.
  • 431
12

You can use GNOME Shell extensions:

  • The awesome Night Theme Switcher GNOME Shell extension provides many options to automatically or manually set the theme you prefer. It also provides a handy panel button to easily switch between themes.

    Night Theme Switcher configuration

    If you decide to use it, make sure to also go to the Themes tab and enable the Switch GTK theme and Switch Shell theme options.

    Night Theme Switcher Themes tab

    This solves the issue of some applications not changing theme due to Ubuntu 22.04 having a mismatch of GNOME versions (some apps use GNOME 42 while others use GNOME 41).

  • Another nice and simple extension that you can use is Light/Dark Theme Switcher. It just sets a panel button that allows switching between your light and dark theme.


Regarding your comment:

But surely there has to be a way to do so in UI? If not that's a really poor user experience to have in a LTS release...

The default session that Ubuntu ships is the Ubuntu session. Installing gnome-session leads to a GNOME session, which provides an experience closer to the default GNOME experience, so Ubuntu cannot really be blamed for issues like the one you're facing.