Flatpak apps always not launching in dark mode; only in light mode

Until maybe 2 updates ago, all Flatpak apps on my system used to launch in dark mode, but now they only launch in light mode. For example:

  1. Bottles now only launches in light mode with no option to change theme.
  2. File upload box is also in light mode. It too used to be in dark mode.

Libreoffice is also really broken

Gradience fixed the file upload dialog.

1 Like

A couple of questions to help start troubleshooting… Is it only flatpaks? Can you confirm “Appearance” in “Settings” is set to “Dark?” If you have GNOME Tweaks installed, is the “Legacy Applications” setting correct for your theme?

1 Like

Yes, it’s only for Flatpaks. In Gnome tweaks, legacy applications is set to “Sweet-Dark”, which I’m sure is correct.

Okay… You could try copying the flatpak’s .desktop file to your ~/.local/share/applications/ folder and make some changes to it to try and force the theme; that is, cp the “bottles” .desktop file in /var/lib/flatpak/app/[bottles directory]/current/active/files/share/applications/ to ~/.local/share/applications/, open it with an editor, and add env GTK_THEME="Sweet-Dark" after the Exec= and before the executable.

That could/should/might work… If that’s unclear, let me know the name of the bottles directory in /var/lib/flatpak/app/ and I can try to be more specific.

If Exec=bottles %u, then please tell me what the edited line should look like

You want to edit it to read:
Exec=env GTK_THEME="Sweet-Dark" bottles %u

That could/should work…

That didn’t work

I know it’s hit-or-miss with Wayland…

Let’s check to make sure the name of the theme is “Sweet-Dark;” what is the name of the theme’s folder in ~/.themes?

If it is correct, does adding an export GTK_THEME="Sweet-Dark" line in your ~/.profile file work?

Theme name in ~/.themes is correct. Adding export GTK_THEME="Sweet-Dark" to my .bashprofile didnt’t change anything.

My guess is this can be attributed to the “un-theming” forced by the new libadwaita stuff; i.e., user themes was always jury-rigged to work and recent changes to GNOME make it work with far less reliability.

OK, thanks!

This article seems to work, but Bottles’ entire UI gets utterly broken

Edit: Actually, some themes work perfectly, so i’m using those