Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-11-07 15:53:49

CwF
Member
Registered: 2018-01-28
Posts: 305

Theme confusion almost [SOLVED]

I don't pay much attention to themes and got lost in Debian Bullseye's XFCE 4.16. In both i386 and amd64 examples of upgraded systems without prior theme changes, most running default Adwaita never changed, the 'Style' tab in 'Appearance' settings is empty. No variations of adwaita are listed.

When I first noticed this oddity, Numix (in a i686) was listed and almost works, it tries, but may be a broken adwaita? This was fixed by reinstalling the numix-gtk2 package and then purging. So this is evidence of prior themes and some error prior to now, the numix package was not installed, prior cruft...

I added blackbird, it showed up, works, there is no way to change it back since it's the only listed choice.
So only blackbird is listed. Using gtk inspector on something else I noticed adwaita was listed and changed it back and forth with blackbird. In "Appearance>Style" this does un-highlight the only listed Blackbird, but can't do it itself.

I looked into the package choices and see adwaita themes are in libgtk-3-0. That is installed. The former gtk2 was gnome-themes-extra which is no longer installed or needed*. With the numix ghost package evidence I assume a config step is being missed somehow, maybe there is no config for libgtk-3-0? Installing gnome-themes-extra, pulling in gnome-themes-extra-data and gtk2-engines-pixbuf; this does restore the 'Style' choices with Adwaita and Adwaita-dark, and works as expected. There is other cruft in /usr/share/themes that also doesn't show.

So after that circle I look at past screen shots and notice neofetch's at first reported "Adwaita (GTK2/3)" without the gnome-theme packages and "GTK2" with them. What am I missing? Without the gtk2 packages, an Adwaita gtk3 option doesn't exist, but is obviously working? This leaves Adwaita-dark option not available.

This may be a vague problem/description, it may be an upgrade issue, it may be a Debian issue? Any insights welcome. I'm not so particular about themes. I stumbled on this trying to change the "Memory swap/main" text in xfce4-taskmanager from "c22b66" dark red in dark modes I can't see, it appears not addressable without an ID in 'CSS nodes'. This led me to find unlisted adwaita-dark, which negates a need for blackbird.

This all also got me wondering if a user can simply define their entire theme in ~/.config/gtk-3.0?
How does this mix in the mixed gtk2/3 environment? I'd like to purge unused gtk2 references, I thought I did, but now find I can't.

And finally, what type file/folder is the +Add button on the Style tab asking for?

Last edited by CwF (2021-11-09 01:33:05)

Offline

#2 2021-11-07 16:39:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Theme confusion almost [SOLVED]

The default fallback theme in GTK3 is Adwaita. That means, that if no theme is specified, it will use the built-in adwaita theme. You are right that there is some confusion because there is no entry listed in Appearance. Note: you can return back to the default (fallback) by clearing out the value in the xfconf database:

xfconf-query -c xsettings -p /Net/ThemeName -s ""

If using the fallback adwaita theme, to get the dark variant, you would add:

[Settings]
gtk-application-prefer-dark-theme=true

...to ~/.config/gtk-3.0/settings.ini and logging out and back in again.

This all also got me wondering if a user can simply define their entire theme in ~/.config/gtk-3.0?

In theory yes. Just remember that the currently selected theme (or default fallback Adwaita theme if none are available) is loaded first and then over-ridden by the content in that file.

How does this mix in the mixed gtk2/3 environment? I'd like to purge unused gtk2 references, I thought I did, but now find I can't.

~/.config/gtk-3.0/gtk.css affects apps built against gtk3. ~/.gtkrc-2.0 affects those built against gtk2. Each app will look at these different locations for override files, after it first looks for the currently selected theme if one exists. The default fallback theme for GTK2 is Raleigh.

And finally, what type file/folder is the +Add button on the Style tab asking for?

From https://git.xfce.org/xfce/xfce4-setting … tall-theme:

# appearance-install-theme <theme-package>
# return value:
# 1: common error, should never happen
# 2: File too big
# 3: Failed to create temp directory
# 4: Failed to extract archive
# 5: Unknown file format
# theme-package can be a tar-file zip-file or a directory
# the following themes types are supported:
# - Gtk-2
# - Gtk-3
# - Xfwm
# - Icons

Looks like a compressed tar.gz or zip file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-11-07 17:22:07

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: Theme confusion almost [SOLVED]

Thanks ToZ.
I suppose I'll take some time to watch various apps and how they are affected by the lack of gtk2 as I intended. Some set ups should be as lean as possible, some it doesn't matter. Most have a gtk3-0 css and no gtk2, so an app audit may lead me to revert some of my gtk2 purge efforts, preferably I will focus on completeness in ~/.config and see if that satisfies everything.

Offline

#4 2021-11-09 01:35:31

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: Theme confusion almost [SOLVED]

Amazing... Yep it's a little bit of a mess. I'm testing on a i386 upgraded to bullseye image used as a base image for layered vm's so I'm looking for minimal function (~700MB image).

So first try is to re-remove as much as possible;
blackbird-theme, gnome-icon-theme*, gnome-theme-extra, gnome-theme--data, gtk2-engines-murrine, gtk2-engines-pixbuf
then installed gtk-theme-switch
and added to ~/.config/gtk-3.0/gtk.css

[Settings]
gtk-application-prefer-dark-theme=true

Nope, comes up standard naked adaita, neofetch says "Theme: Adwaita-dark [GTK2]" interesting!

So, gtk-theme-switch has no link to the present 'gtk-theme-switch2', sloppy!
But this is a beautiful old school tickle looking thing! And it doesn't help, but has only 'Raleigh' which I've seen nowhere! It can add a theme, wants a gzip theme or maybe a gtkrc file. Doesn't help select a dark gtk3 adwaita, seems gtk only, but cool...It installs a gtkrc-2.0 file and .themes directory which it can't click to in it's file chooser!
So remove that...

Well, neofetch likely gets its info from xsettings ThemeName, and in the SettingsEditor does indeed list Adwata-dark. But it is the light theme. Reset to default set 'Xfce' as the setting, still no change. Edit to 'Adwaita-Dark' or 'Adwaita-dark' or 'Adwaita'. Also, the gtk-3.0/gtk.css makes no difference, it may have set that first sighting in xsetting but as all methods so far - no effect.

Is there a way to list all possible settings for /Net/ThemeName?
These changes are reflected in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml
They just don't change anything!

For a full circle excercise - installing what I removed does restore gtk2 and the gtk2/3 options and all works. Stipped like I have it, despite the claim of a gtk3 adwaita in libgtk-3-0 - nothing dark, not in my example of Debian 11. I'll take a look at bookworm and report back... Wait, I'll look at the /usr/share/themes/Adwaita-dark/gtk-3.0/ on one of the other setups...

Added to ~/.config/gtk-3.0/gtk.css

@import url("resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css");

...and it works!
out with old in with the new!?! With all said packages still removed, 'ThemeName is 'Xfce' and reports as GTK2, whatever...So I'll mark this solved.

* tangents are fun! When I pulled gnome-icon-theme it pulls the icon for xfce4-taskmanager, and it is not a dependency! That needs fixed, so a manual copy of just that icon...

Offline

#5 2021-12-21 19:14:18

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: Theme confusion almost [SOLVED]

Update!
Not completely solved, but simply adding the index.theme files in /usr/share/themes/Adwaita and Adwaita-dark makes the themes selectable again in Settings>Appearance. How much of the further structure is required, not done yet... I just yanked both directories from a buster and dropped them into a bullseye and everything seems happy.
Obviously declarations in ~/,config/gtk* need to be cleared.

It seems a Debian oversight to have pulled these default choices.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 563.95 KiB (Peak: 564.79 KiB) ]