Setup
When a Qt app (KeePassXC, AntiMicroX) is started automatically (via autostart), the GTK theme is not applied.
- All apps are installed via standard
aptpackages (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-pluginsapt 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?