linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.48k stars 728 forks source link

Failed to load module "xapp-gtk3-module" #10294

Closed bastiencyr closed 3 years ago

bastiencyr commented 3 years ago
 * Cinnamon  : 5.0.5
 * Distribution - Mint 20.2 
 * 64 bit

EDIT: I found the following error : Failed to load module "xapp-gtk3-module". Some issues are related : https://github.com/linuxmint/mint20.1-beta/issues/87 but closed. My system is up to date, so I don't understand why I have this error.

This issue can be moved to xapp.

Issue Hello, Not sure if it is the right repo for this issue. But, it seems to be proper to Linux Mint. I already open an issue on https://github.com/borgbase/vorta/issues/1023 but this problem appears for all qt application. When I launch a qt app, I have the default qt theme and not the Gtk theme. I installed org.gtk.Gtk3theme.Mint-Y-Dark-Pink and it doesnt work too. Thanks for helping :)

mtwebster commented 3 years ago

The message doesn't have anything to do with themes. When running a 'normal' (non-flatpak app) this module gets loaded at startup, and adds 'Favorites' to any gtk file dialogs. This is to support favorite files (created in Nemo via right-click->Add to favorites).

Since flatpaks run in their own isolated filesystem, that module wouldn't be available. Also, I'm fairly certain Qt wouldn't support it anyhow.

It's unfortunate that this message seems so ominous when a module doesn't get loaded, but it's definitely harmless, and can be ignored.

bastiencyr commented 3 years ago

Ok thanks @mtwebster . And do you have any idea why the theme is not loading in qt app ?

mtwebster commented 3 years ago

Qt themes are completely different from gtk ones. I do know they make efforts to allow some integration between the two toolkits, but I really am not very familiar with Qt. Does messing with 'Qt5 Settings' in the start menu do anything? I know it does for normal qt apps, but I'm not sure about flatpaks.

bastiencyr commented 3 years ago

For non flatpak it works well, for example vlc or keepassxc (both are qt app) work well and follow the Mint-Y-Dark-Pink theme.

According to the flatpak documentation, "The applications will try to match the system theme currently being used, if it corresponds to any of the Flatpak themes installed, and will fall back to Adwaita (if they use Gtk2 or Gtk3) or the default Qt theme (if they use Qt) if a corresponding theme isn’t detected." https://docs.flatpak.org/en/latest/desktop-integration.html#theming . I installed the Mint-Y-Dark-Pink flatpak theme but it doesnt work. In the doc too, they says that on X11, "you need an xsettings daemon that is correctly configured". I installed xsettingsd but I cant see any daemon running and I dont know how to configure xsettings.

Maybe this issue can be moved to flatpak repo. But it may be a packaging issue in Linux Mint. I will try to run a flatpak app in a fresh Linux Mint and Ubuntu installation to confirm my assertion.

mtwebster commented 3 years ago

You should get rid of xsettingsd - Cinnamon has one, and it already does the job described here: https://docs.flatpak.org/en/latest/desktop-integration.html

Did you install the 2 packages specified here? https://docs.flatpak.org/en/latest/desktop-integration.html#instructions-for-qt. It seems as though these are suppose to help with integration between toolkits, though I'm not sure. I'm surprised these don't get automatically installed when installing a qt app (especially in a gnome/gtk environment).

I installed the Dolphin flatpak and it uses my icon theme, but not the gtk theme for some reason. Regardless, I don't really think this is an issue with Cinnamon/Mint.

mtwebster commented 3 years ago

Make sure if you try Ubuntu to do so in x11 mode (not wayland) - it looks like some of this theme-related stuff is handled differently there.

I'm definitely willing to improve integration if something is found, though if the answer is 'make a Mint-Y qt theme' I'm not sure how soon that might happen :)

bastiencyr commented 2 years ago

Hello @mtwebster ,

I have some more informations over this subject. Qt app integration in Gnome is made by qt5-style-plugins which contain a gtk2 style. For software installed via apt, there is no problem because they can access files of qt5-style-plugins (probably in /usr). Thats why vlc seems nice in Gnome. But Flatpak app cant access this, and it seems that there is no package for qt5-style-plugins in flatpak. So a solution is to integrate qt5-style-plugins directly in your flatpak package. Unfortunately, we use PyQt and I didnt find python package of qt5-style. A partial solution can be found here https://stackoverflow.com/questions/63477276/add-qstyles-to-pyqt5 .

Notice that Qt company hasnt updated qt5-style since 4 years ! I think because they focus their effort on qml which has a very good integration in all desktops.

Btw, It seems that cinnamon-settings-daemon is not running on my laptop. org.cinnamon.SettingsDaemon.plugins.xsettings is not shown in d-feet :(

mtwebster commented 2 years ago

That doesn't have a dbus presence - you can just check if the process is running - ps -A | grep csd-xsettings. I imagine this is running - you'd have additional problems with appearances if it wasn't.