Custom gtk themes refuse to apply

when i give sudo

rich text editor image

the theme for the title bar is properly applied while the
when launched with user only

rich text editor image

it falls back to adwaita
same logic applies to Wireshark but while all other software like Geany it was applied in both,

changing CSS in ~/.config/gtk-40 does not help at all but works for other apps like Geany

please do help because this inconsistency it makes my gnome looked ugly

this kind of issue is bugging me for 3 installations

this gtk theme still gets applied in the GTK but not the title bar

edit:
The theme I used is Colloid-gtk-theme which has all the necessary files to theme, but this issue somehow appeared after prolonged use of the gnome. I went back to see the history and found nothing. Do help, thanks!

I tried to use Unite gnome extension to disable the title bar, but it was unable to get it removed

edit:
this issue seems to work presistently on new user

also only on wayland

╭─user@macbook ∞ /usr/share/themes
╰─$ ls -l
total 0
drwxr-xr-x 1 root root  50 May 22 05:46 Adwaita
drwxr-xr-x 1 root root  50 May 22 05:46 Adwaita-dark
drwxr-xr-x 1 root root 152 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula
drwxr-xr-x 1 root root  10 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula-hdpi
drwxr-xr-x 1 root root  10 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula-xhdpi
drwxr-xr-x 1 root root  36 May 22 05:42 Default
drwxr-xr-x 1 root root  36 May 22 05:42 Emacs
drwxr-xr-x 1 root root  50 May 22 05:46 HighContrast
drwxr-xr-x 1 root root  14 May 22 05:42 Raleigh

and when under user

╭─user@macbook ∞ ~/.themes
╰─$ ls -l
total 0
drwxr-xr-x 1 user user 152 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula
drwxr-xr-x 1 user user  10 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula-hdpi
drwxr-xr-x 1 user user  10 Sep 14 16:55 Colloid-Green-Dark-Compact-Dracula-xhdpi

i have set that

╰─$ gsettings get org.gnome.shell.extensions.user-theme name
'Colloid-Green-Dark-Compact-Dracula'
╭─user@macbook ∞ ~
╰─$ gsettings get org.gnome.desktop.interface gtk-theme
'Colloid-Green-Dark-Compact-Dracula'
╭─user@macbook ∞ ~
╰─$ gsettings get org.gnome.desktop.wm.preferences theme
'Colloid-Green-Dark-Compact-Dracula'

this issue somehow came up days until I noticed this issue

the system still getting override with

╰─$ gsettings monitor org.gnome.desktop.interface
color-scheme: ‘default’

color-scheme: ‘prefer-dark’

Even i had set these all up

That does not look like a gtk application, but like some other toolkit. That toolkit does not follow gtk themes and probably only tries to recreate the libadwaita look when drawing its titlebar.

When starting the application as root however, it probably fails to use its Wayland backend and instead runs as X11 application. For X11 applications that don’t provide their own decorations, the compositor can draw decorations (using gtk4).

Oh, thanks for the input, yes all the theming works properly under x11. But when I am on wayland I can’t seem to theme that at all. The gnome setting theme style setting still overriding what I had for the title bar. Normally like this when on clean installation this gnome setting style option will not work at all, but I am not sure how to bring it back.

The fallback mechanism does make sense, but it does not make sense why when under Wayland decorations on title bar are nonadjustable.

Hi can someone help me out with this issue, this issue happens everytime i reinstall my distro. How do i reset this

If It’s a native wayland app, then it’s CSD. Controlled either by a toolkit or libdecor

its not really a native wayland so not CSD

where do i control that
”a toolkit or libdecor”
I have been searching for a solution for years and no nada

I only did a quick search out of curiosity, but it seems your application can run as a native Wayland one, and therefore does use CSD on GNOME.

You can’t, at least no in an uniform way.
“A toolkit” can mean GTK, it can mean Qt. It could also mean libcosmic, or Granite, or some custom thing someone created for their app. There are many toolkits out there, and if and how to change their themes can differ wildly.
Same goes for libdecor. It can use GTK to draw the titlebar, but it doesnt have to.

1 Like

Since this app is not gtk but CSD.

Colloid gtk theme has these thems for the CSD and it doesnt seem to be applied On the clean installation of linux it does. So I am not sure how to fix this.

Is there a way to force it on user

There seems to be a misconception here. Your theme has very certainly no themes for CSD.

On X.11, it was common for a long time that the window server would draw the decorations, like titlebar, -buttons and border.
This is known as “Server-Side Decorations”, or SSD. Some of the window servers offert the ability to theme these decorations. The themes in your theme are likely for SSD of these old window managers.

On GNOME with Wayland though, you can use only “Client-Side decorations”, or what has been referred to as CSD. CSD means that the application itself draws the decorations, and the window manager just displays the final window without adding anything.

So, under CSD, the decorations are always under the control of the application. It can display a normal titlebar, sure. It could also add other elements to it, like how in GNOME apps the titlebar has merged with the action bar to become the header bar. Or it could do even other things, if its serves a purpose.

This offers the developers of the app more opportunities to decide how an application can be designed and controlled, and can leave to better user interfaces.

But it also means that the control over the titlebar style has been given from the user over to the application.

1 Like