Setup
When a Qt app (KeePassXC, AntiMicroX) is started automatically (via autostart), the GTK theme is not applied.
- All apps are installed via standard
apt
packages (I am aware of snap theming issues). - I am on Ubuntu
20.04
, I use the Yaru dark gtk theme. - To apply the GTK theme onto Qt apps, I did the following:
- Installed the
qt5-style-plugins
apt package (with all of its dependencies) - Added a line to
/etc/environment
:QT_QPA_PLATFORMTHEME=gtk2
- This works properly if I start the applications manually
- Installed the
Additional fiddling showed, that on cold start the theme never gets applied properly, however, on a restart, it does work sometimes.
Questions
How can I ensure that the dark gtk application theme gets properly used?
I would assume that when the autostart happens, some setting is not loaded, hence the breakage. Is there some sort of "service" those apps would have to wait for?
Should I try to add delay?
snap
? Edit your question to add this information – Archisman Panigrahi Dec 07 '20 at 11:21snap
theming is a different problem I gave up on (some say its work in progress) – MrMeszaros Dec 07 '20 at 11:29qt5ct
, it's a qt5 configuration tool, that might be helpful for you. – mook765 Dec 13 '20 at 23:51