Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Solved] Defect visual themes (Read 1788 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[Solved] Defect visual themes

Bonjour,

Just yesterday I installed Artix Linux XFCE OpenRC from the artix-xfce-openrc-20210426-x86_64.iso using Calamares.

I don't use Thunar, but Dolphin.

When choosing the Adwaita theme, I notice that the visual themes are mixed.
The background of Dolphin, Gimp, or some configuration windows is black...

I found an unscientific method to fix it (it has been working for over a year):

Reinstall all the packages present.
sudo pacman -S $(pacman -Qnq)

After this "cure", all the colors are correct everywhere ... on condition of commenting (add # at the beginning of the line) in /etc/environment the two lines:
# QT_QPA_PLATFORMTHEME=gtk2
# QT_STYLE_OVERRIDE=gtk

sudo mousepad /etc/environment

Re: Defect visual themes

Reply #1
Quote
Reinstall all the packages present.
sudo pacman -S $(pacman -Qnq)

You only need to reinstall the package gtk2

and delete the file ".gtkrc-2.0" (and the  link ".gtkrc-2.0-kde4") from  your home-directory.

You should also delete .gtkrc-2.0 and .gtkrc-2.0-kde4 from "/etc/skel"


Don't no why, but this worked for me...

Re: Defect visual themes

Reply #2
You only need to reinstall the package gtk2

and delete the file ".gtkrc-2.0" (and the  link ".gtkrc-2.0-kde4") from  your home-directory.

You should also delete .gtkrc-2.0 and .gtkrc-2.0-kde4 from "/etc/skel"


Don't no why, but this worked for me...

Very interesting ! 😎
I note for the next installation.
Thank you !

Re: Defect visual themes

Reply #3
Why install?
Because only gtk2 is affected, it is enough in live session to fix it:
Code: [Select]
sudo rm /usr/share/gtk-2.0/gtkrc
That's all you need to do, even after the installation.
I'm happy to be taught a lesson, but I think that all live.iso have the problem.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: Defect visual themes

Reply #4
When I switch theme in Plasma/MATE/XFCE/AnyDEorWM the colours are broken!
Quote
Notice: very few themes have complete support for Qt and Gtk2 and Gtk3, namely Breeze, Adwaita, Vertex and Artix-dark. Ergo, using an other theme will most probably result in inconsistent look across different toolkit applications.
Quote
All Artix ISOs, except base, come slightly preconfigured with a nice, uniform dark theme. To force uniformity across Qt and GTK, some tricks had to be performed, namely:

Creating a theme that has support for all major toolkits, i.e. Qt, Gtk2 and Gtk3. In our case, the dark variant of Vertex was modified into Artix-dark.
Choosing a common style, icon and colour theme.
Instructing (or forcing) the active toolkit to use a theme engine that translates one toolkit into another. The chosen solution was to make Qt follow Gtk and this was achieved through qt5-styleplugins and the QT_* environment variables defined in /etc/environment.

Re: Defect visual themes

Reply #5
I thought of a next installation of Artix on another PC, because at home everything is correct.

Just now I did what you suggested and after restarting the X server, everything is normal.

So, I'll see what happens when I install the next Artix XCFE.

Quote
Because only gtk2 is affected, it is enough in live session to fix it:
Code: [Select]
sudo rm /usr/share/gtk-2.0/gtkrc
That's all you need to do, even after the installation.
Ok, thank you. I will test this tomorrow in live mode.

Quote
I'm happy to be taught a lesson, but I think that all live.iso have the problem.
On the other isos that I tested I had left the original theme and everything was correct.
It was only when choosing the Adwaita theme over XFCE4 that I had this mess in the appearance of the windows.

Re: Defect visual themes

Reply #6
Dolphin is a Qt (KDE) application, and XFCE is a gtk-based DE, so this part of the wiki page I linked above also applies:
Quote
Our Gtk-based DEs use the QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE environment variables to control the appearance of Qt applications. Using an all-toolkit theme like Breeze or Artix-dark is recommended and no additional actions are needed to achieve visually appealing results. Otherwise, those variables may need to be disabled in /etc/environment. For some Qt applications that follow ~/.config/kdeglobals, you may need to delete the lines containing 'artix-dark' from it (or delete it).
Anyone interested in tuning themes is advised to read that whole section, and the corresponding Arch wiki page, linked from it.

 


Re: [Solved] Defect visual themes

Reply #9
I assumed so, this was more for @tscho and @lq, who replied to this ~8 month old thread.
It doesn't matter how old the thread is, the error is still there and reading Wiki doesn't help but:
Code: [Select]
sudo rm /usr/share/gtk-2.0/gtkrc
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: [Solved] Defect visual themes

Reply #10
If you read the wiki, you will see that this is not an "error", but a deliberate feature. It is due to how Artix-dark was made possible. Also:
Quote
Most of these settings are installed in /etc/skel, which means that they are copied over to the home directory of every created user. It also means that removing the package doesn't delete the files from the home directories: they have to be removed manually, if so desired.
and
Quote
Our Gtk-based DEs use the QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE environment variables to control the appearance of Qt applications. Using an all-toolkit theme like Breeze or Artix-dark is recommended and no additional actions are needed to achieve visually appealing results. Otherwise, those variables may need to be disabled in /etc/environment. For some Qt applications that follow ~/.config/kdeglobals, you may need to delete the lines containing 'artix-dark' from it (or delete it).
and
https://wiki.archlinux.org/title/GTK#Themes
Quote
Arch Linux has a custom configuration file at /usr/share/gtk-2.0/gtkrc, which sets the default theme to Adwaita.

To force a specific theme, set the following environment variables:

For GTK 3 and GTK 4, use GTK_THEME. For example to launch GNOME Calculator with the dark variant of Adwaita:
$ GTK_THEME=Adwaita:dark gnome-calculator
Note: To apply the above to desktop shortcuts (or launchers) see Desktop entries#Modify environment variables.
For GTK 2, use GTK2_RC_FILES. For example to launch GIMP with the theme Raleigh:
$ GTK2_RC_FILES=/usr/share/themes/Raleigh/gtk-2.0/gtkrc gimp
Tip: gtkrc can also be a custom file in your home directory created by any of the #Configuration tools. See #Examples.
(So no need for such a drastic action as removing the system-wide gtkrc. Just create/edit your own per-user gtkrc in your home directory.)

Just set aside 10 minutes to read the wiki, it's not that hard and more informative than just those fragments that I quoted.

About this:
It doesn't matter how old the thread is,
Speaking generally: it very much does matter. Things can change drastically with time, and I'm not talking only about the discussed topic. People who posted originally might not be available to respond (not the case here, but it might happen generally), they might take a different stance on the topic or lose interest. So don't necro old topics.

Re: [Solved] Defect visual themes

Reply #11
As I have noticed in other posts to this forum, people seem to answer rather unfriendly here. This is striking when there is no immediately plausible answer to a problem. It seems that people want to distract from one's own lack of knowledge by reproaching the user, e.g. for a late answer. Even if my answer was late, the problem still exists and no one has commented on it yet.

And now my last post, then I will say goodbye to this unfriendly forum and to Artix.

Even if the Artix maintainers love dark themes, I am not a fan of them. Therefore I would also like to be able to select another theme. Unfortunately, this is still not possible with Artix-XFCE. I have documented my observation again and I don't think it can be called a feature.

I used the behaviour of leafpad for documentation:

  • leafpad started - default dark theme active
  • theme Aidwaita selected (leafpad is still partially dark!!!)
  • reinstalled gtk2 (leafpad still partly dark)
  • deleted .gtkrc-2.0, now everything is OK

And no, deleting .gtkrc-2.0 is not enough. I also have tested the reverse order, first delete gtkrc-2.0, then reinstall gtk2. Both actions are necessary for the display to be correct.

https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_7fe3ff2c7eec98c66dcbafa3f92129e7;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_dedc17cbe62485de57c99090cfead88f;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_f7eccb460bf79c74d0cdf31144e47fe3;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_d88fb43f7264e06ab176df32d6dd20d4;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_0bf2575aae7ea87f265a005cf7ad07bf;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_9163ad53fafc0f5301bc7fb320508f9c;topic=2535

And to @lq
This does not solve the problem either (see screenshots).
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_8634aaa0fce7343949719428b2ced0fe;topic=2535
https://forum.artixlinux.org/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_2399_dc94b7b58edc940b2ae1f1a6c80a6acb;topic=2535

To @strajder
And what use is reading the wiki if it doesn't work in practice?

Re: [Solved] Defect visual themes

Reply #12
As I have noticed in other posts to this forum, people seem to answer rather unfriendly here. This is striking when there is no immediately plausible answer to a problem. It seems that people want to distract from one's own lack of knowledge by reproaching the user, e.g. for a late answer. Even if my answer was late, the problem still exists and no one has commented on it yet.

And now my last post, then I will say goodbye to this unfriendly forum and to Artix.
@strajder is right, things change over time. It seems that leafpad (and only leafpad) for some reason reads /usr/share/gtk-2.0/gtkrc, which is tuned to artix-dark. Deleting it, without re-installing gtk2, does the trick.

Even if the Artix maintainers love dark themes, I am not a fan of them. Therefore I would also like to be able to select another theme. Unfortunately, this is still not possible with Artix-XFCE. I have documented my observation again and I don't think it can be called a feature.
Of all the pre-installed applications of the XFCE ISO, only leafpad exhibits that behaviour. Out of curiosity, I installed mousepad and it follows the xfce4-appearance settings.



I used the behaviour of leafpad for documentation:
>snip<
And no, deleting .gtkrc-2.0 is not enough. I also have tested the reverse order, first delete gtkrc-2.0, then reinstall gtk2. Both actions are necessary for the display to be correct.
As I showed above, the problem is the misbehaving nature of leafpad, which overrides the user settings (or mixes them with the system-wide ones). If /usr/share/gtk-2.0/gtkrc is deleted, then leafpad works as intended.

To @strajder
And what use is reading the wiki if it doesn't work in practice?
You found a needle in a hay barn. Good luck with your next distro.

[EDIT] The root of the problem seems to be that leafpad is linked against gtk2, while xfce4 and mousepad are gtk3. This means that when changing the appearance settings in XFCE4, ~/.gtkrc-2.0 isn't modified. You can't please them all.


Re: [Solved] Defect visual themes

Reply #14
i know this is an oldish thread but, it was a bit of a saver too - I'm not a fan of dark themes, they look nice but my eyes don't deal with them so well, so when i originally started looking at artix and gave it a go, changing to a light theme got me well and truly stumped as many sub menu's were just odd, black on black.   This was in virtualbox amongst others, so am very glad i stumbled on this thread as to correct it as it was a head scratcher to say the least!   Its one of those little things which is far from obvious, and maybe could even turn people away from trying artix for any length of time, if they were a lighter theme type of person, and that would be a shame 'cause it's a great project, the future of Arch is non-systemd after all.