linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.21k stars 81 forks source link

systray (Notification Area) symbolic icon does not adapt to themes on Xfce panel #10

Closed SwampRabbit closed 4 years ago

SwampRabbit commented 4 years ago

I have been trying to get Warp to work properly on either Debian Buster or Bullseye with the Xfce desktop.

So far I believe that I am building Warp successfully with both pbuilder and or sbuild.

But the Warp symbolic icon that is used by systray (Notification Area) does not adapt to gtk dark themes on Xfce panel Debian Buster or Bullseye. Warp.py is shown in the systray.

Fresh installs:

I see Linux Mint has a custom version of libappindicator on GitHub, could this why Mint Xfce is the only one that the systray (Notification Area) symbolic icon adapts properly?

Maybe there is a build time dependency specifically needed for the xfce-panel systray?

This doesn't help me understand why Debian Bullseye and MX-19.1 with mate works but not with Xfce though. So there is something specific with Mint or possibly Ubuntu derivates that makes it work. I am going to test with Xubuntu next

And cross post this in the Xfce forums as well.

Thank you in advance

mtwebster commented 4 years ago

The custom libappindicator library only allows programs that were written to use libappindicator (vs GtkStatusIcon) to display in the XApp status applet - Warp does not do this, it uses XAppStatusIcon natively.

In Mint 19.3 XFCE we've patched xfce4-panel to work with symbolic icons. I think the upstream version does not currently (I believe we've submitted a patch to them, but I'm not entirely certain).

Mate I believe has had symbolic support for a while, which probably explains why it works.

SwampRabbit commented 4 years ago

@mtwebster thank you for the quick response.

I don't think it is a bug with Warp, because other applications are doing the same thing when it comes to symbolic icons. Could just be the panel or maybe I am just not up on the libappindicator nuances.

This is the response I got on the Xfce forum. https://forum.xfce.org/viewtopic.php?pid=57209#p57209

Have you tried using the xfce4-statusnotifier-plugin instead? It is intended to work with libappindicator applets.

I guess I have a big ask, is it possible to have Warp determine if the old style icons or symbolic icon should be used based on panel and or panel plugin technology being use? I get that it really isn't your concern and it looks like a lot has been done by the Mint to to make things work already. :)

mtwebster commented 4 years ago

This has nothing to do with libappindicator - warp doesn't use it.

The reason they are recommending that you use the other plugin is probably because when it's an appindicator 'icon' - the icon is rendered by the panel/plugin, not the application that the icon is for. So as a result, it's much easier for them to render symbolic icons.

GtkStatusIcon programs are rendering their icon to the xserver, which tells the panel plugin/applet about it, and the applet is simply rendering or re-rendering an existing icon that it really has no control over.

We made XAppStatusIcons (which warp uses) so that the panel/plugin renders the icon (just like libappindicator). We patch appindicator on Mint distros so that those programs that are using it (and not XAppStatusIcon or GtkStatusIcon) to provide a tray icon, will render in an XApp applet instead (such as xfce4-xapp-status-plugin)

Symbolics aren't working in vanilla XFCE4 because I don't think their systray plugin supports it.

Adding the applet they recommended won't fix the issue with warp or any other program that doesn't specifically use libappindicator for their status icons

Lastly, the old-style systemtray icons (GtkStatusIcon) are deprecated by gtk and more or less unmaintained (this is what deprecated means to them) - this is part of why things such as libappindicator and our xapps have sprouted up. And it's probably why xfce isn't in a hurry to fix things for it (I'm not criticizing at all, it's not an invalid reason). We do what we do as far as patching, etc.. because we're looking at our distro as a whole, and we want things to work and look good, and the alternative is to attempt to explain to our users (with vastly different levels of experience) why this or that is broken - we don't do this for everything, but in certain situations where there's low risk or a simple fix we'll consider it.

Yes this is confusing, it's not you :)

As for having some sort of detection, the reason we supplied XApp applets for mate and xfce4 is so that wouldn't be necessary - you run that applet on your panel, xapp icons render correctly, along with (only in mint) libappindicator programs.

The reason they're not available in older xfce versions (<4.14) is that this is the release that they switched from gtk2 to gtk3, and re-did their plugin interface, so we didn't make a plugin for the older versions.

You should be able to install and run the xapp plugin in Debian Bullseye without any issues:

git clone https://github.com/linuxmint/xfce4-xapp-status-plugin.git
cd xfce4-xapp-status-plugin
dpkg-buildpackage
cd ..
sudo dpkg -i *.deb

You will probably get missing dependency errors the first time you try to build - just install those missing packages and re-try. The same goes for installation - it will likely fail saying you need to install packages. These should be resolved by running sudo apt-get install -f

SwampRabbit commented 4 years ago

@mtwebster thank you for the quick and very detailed response!

Some of it I am tracking, but you've really explained what I didn't know or understand all very well.

I will package xfce4-xapp-status-plugin, I've already started on several other xapps.

I will also hunt to try and find the specific point at which the xfce-panel was patched and work on incorporation of it, and pass it on to the Xfce team if they aren't tracking it already.

You can close this issue if you believe it isn't worth tracking as an issue for distros outside of Mint at this time. Its not a Warp specific issue that's for sure.

SwampRabbit commented 4 years ago

@mtwebster I am closing this as it isn't an issue with Warp and I was able to diff out the modifications that Mint made to xfce-panel into an actual patch file Using this seems to fix the issue.

I plan on proposing it to the Xfce team to get added upstream, I didn't see it done already, but I will check again before I do.

Credit going to the Mint team obviously.