linuxmint / xapp

Cross-desktop libraries and common resources
GNU Lesser General Public License v3.0
127 stars 44 forks source link

XAPP_FORCE_GTKWINDOW_ICON doesn't work anymore on Debian Testing XFCE #145

Closed ivan-hc closed 3 years ago

ivan-hc commented 3 years ago

I have some custom profiles with Firefox, after updating at version 92 XAPP_FORCE_GTKWINDOW_ICON doesn't work anymore. I've tested this on other programs and this doesn't work too. Now I've updated libxapp1 from the Debian Experimental branch and it doesn't work too. I don't know if this depends on other libraries from Debian Testing/Unstable, but now I'm unable to use a different icon in my webapps when they are opened (titlebar and xfce-panel). How to solve?

mtwebster commented 3 years ago

This functionality depends on a gtk3 module -

Is your environment set to use it?:

> env | grep GTK3
GTK3_MODULES=xapp-gtk3-module

That gets defined by this file when the session starts:

/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh

The appropriate location for that file has changed over time - who knows, maybe it changed again, I have no idea about debian experimental.

The actual module should be installed here:

/lib/x86_64-linux-gnu/gtk-3.0/modules/libxapp-gtk3-module.so

If you start these apps in a terminal does it say 'Failed to load ... module'?

ivan-hc commented 3 years ago

Hi

Is your environment set to use it?:

> env | grep GTK3 GTK3_MODULES=xapp-gtk3-module

That gets defined by this file when the session starts:

/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh

I've not xinitrc.d/80xapp-gtk3-module.sh in /etc/X11/xinit/, should I create it?

Starting these apps in the terminal I've no messages, it will opened in Firefox normally (with the firefox icon).

PS: echo $GTK_MODULES doesn't show anything

mtwebster commented 3 years ago

it's GTK3_MODULES, not GTK_MODULES.

That file should be installed by the package

It looks like the debian guys may have missed a change a while back: https://github.com/linuxmint/xapp/commit/cba181dedeab3aa04aa5327e824d048dd8ed85cd#diff-ee0d750477d547a86d51c7a857402ca2dda7aed3d3f130978183d81ef204f9c2

The init file may not be getting installed: https://salsa.debian.org/cinnamon-team/xapp/-/blob/master/debian/xapps-common.install#L8

Check etc/X11/Xsession.d to see if that file is there (80xapp-gtk3-module.sh) - if it is, try copying it to /etc/X11/xinit/xinitrc.d and make sure it's executable.

@Fantu @ItzSwirlz

mtwebster commented 3 years ago

That file may not be installed anywhere, actually - you can get it here: https://raw.githubusercontent.com/linuxmint/xapp/master/data/80xapp-gtk3-module.sh and copy it into the location I said. Make sure it's executable.

ivan-hc commented 3 years ago

80xapp-gtk3-module.sh is in etc/X11/Xsession.d without flag "executable". I've copied it to /etc/X11/xinit/xinitrc.d/ and now both are executable. I've rebooted the PC but no custom icon appear on my webapps.

ivan-hc commented 3 years ago

UPDATE: XAPP_FORCE_GTKWINDOW_ICON works for other programs, not Firefox

mtwebster commented 3 years ago

No idea - works for me on Mint here with ff 92 - are you running it in a sandbox? Flatpak version?

ivan-hc commented 3 years ago

UPDATE2 - I've removed /etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh, rebooted and re-tried with another program: XAPP_FORCE_GTKWINDOW_ICON=gmail gedit opens gedit with the icon of gmail. So the problem belong to Firefox.

ivan-hc commented 3 years ago

are you running it in a sandbox? Flatpak version?

No, this is the official bundle from the official website of Mozilla. It worked well until the update to Firefox 92.

ivan-hc commented 3 years ago

I've found this in /home/$USER/.xsession-errors:

(polkit-gnome-authentication-agent-1:1113): polkit-gnome-1-WARNING **: 17:17:18.813: Unable to get a pixbuf for GTK_STOCK_DIALOG_AUTHENTICATION (gtk-dialog-authentication) at size 48 Gtk-Message: 17:17:23.855: Failed to load module "xapp-gtk3-module" Gtk-Message: 17:17:23.870: Failed to load module "xapp-gtk3-module" Gtk-Message: 17:17:23.892: Failed to load module "xapp-gtk3-module"

mtwebster commented 3 years ago

is GTK3_MODULES in the environment when firefox launches?

what about:

GTK3_MODULES=xapp-gtk3-module XAPP_FORCE_GTKWINDOW_ICON=gmail firefox
ivan-hc commented 3 years ago

tried GTK3_MODULES=xapp-gtk3-module XAPP_FORCE_GTKWINDOW_ICON=gmail firefox --class WebApp-Gmail --profile /home/$USER/.mozilla/firefox/gmail https://gmail.com, nothing happens (the browser starts in gmail.com with the gmail profile, but still with the firefox icon).

mtwebster commented 3 years ago

Ah I'm on cinnamon, this is why it works for me (the xapp thing here is for mate and xfce only). I'll have to have a look at what got changed. It was definitely ok in 91?

ivan-hc commented 3 years ago

Yes, I've also reinstalled Firefox 91.0.2 and XAPP worked well. The new Firefox 92 has this problem.