lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
73 stars 33 forks source link

Status Notifier not showing correct icons having dash in their names #260

Closed ahsand97 closed 3 years ago

ahsand97 commented 3 years ago
Expected Behavior

All applications that use appindicator should display their icon correctly in the panel.

Current Behavior

Some applications don't display their appindicator icon, it just shows the generic application-x-executable icon, Remmina is one of them, if I install Remmina normally and run it, it doesn't show the appindicator icon but it does display the icon correctly with the package Remmina-appindicator which is a Remmina version compiled with its own libappindicator as far as I know. I'm developing some apps in Python and Java with GTK3 and have tested on both languages libraries that creates appindicators and same thing happens, no icon showing just the generic application-x-executable.

Remmina package: (it shows the generic application-x-executable icon for the appindicator) image

Remmina-appindicator package: (it shows correctly its icon for the appindicator) image

JappIndicator library to create AppIndicators in Java: (I've tested this on XFCE and GNOME and both works perfectly) image

SystemTray library to create AppIndicators in Java: (tested on both XFCE and GNOME too and it works) image

The only log I see when I run lxqt-panel from console and run those apps is this (don't really know if packages are missing):

Systray started
()
Error on DBus request(org.kde.StatusNotifierItem-1207-2,/StatusNotifierItem): QDBusError(org.freedesktop.DBus.Error.UnknownProperty, Property org.kde.StatusNotifierItem.IconThemePath was not found in object /StatusNotifierItem)
Error on DBus request(org.kde.StatusNotifierItem-1208-1,/StatusNotifierItem): QDBusError(org.freedesktop.DBus.Error.UnknownProperty, Property org.kde.StatusNotifierItem.IconThemePath was not found in object /StatusNotifierItem)
Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «ToolTip»)
Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «OverlayIconName»)
Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «OverlayIconPixmap»)
Possible Solution
Steps to Reproduce (for bugs)
  1. Install Remmina or use this libraries for java to create appindicators (JappIndicator or SystemTray)
  2. Run Remmina or the test examples given by those libraries
  3. The apps run perfectly but their appindicator in the panel shows the generic application-x-executable and not the desire icon.
Context

This is really annoying cause I really like appindicators over systray icons and since I develop desktop software I really wanted to use appindicators on lxqt but for some reason no matter what language or library I use same thing happens, it doesn't show the chosen icon.

System Information
tsujan commented 3 years ago

Not reproducible.

To check your report, I installed Remmina (the first icon from the right):

Remmina

ahsand97 commented 3 years ago

I still can reproducte it , just tested with Garuda Linux LXQT .iso on a virtual machine and just installed Remmina and I still see no icon for its appindicator, same with Manjaro LXQT .iso with virtual machine:

Remmina icon the one with the exclamation symbol image

Remmina icon the last one on the right image

How is this not a bug or should I install another package??

tsujan commented 3 years ago

Make sure you have all core libraries of LXQt and also optional dependencies of Arch's LXQt packages.

tsujan commented 3 years ago

Also, libappindicator-gtk3 and libappindicator-gtk2 (which should be among optional dependencies but I'm not sure if that's the case with Arch).

ahsand97 commented 3 years ago

All libraries are installed including libappindicator-gtk3 and libappindicator-gtk2 and yes, indeed I've only tested with Arch based distros, but then why it works for Arch + XFCE and Arch + GNOME but nor for LXQT??? maybe there's a dependency I don't know about to make appindicators work but all core dependencies seems to be installed.

For Remmina the only way it shows its appindicator is using the package remmina-appindicator which in the description says it is compiled with appindicator (don't know what does that mean) but for other apps it only shows the application-x-executable icon, the thing is if I remove the Status Notifier Plugin and only use the obsolete SysTray the icons work, all of them, Remmina, the libraries I mentioned for Java, so I guess there's a bug in either a package or in the Status Notifier Plugin or there's something missing.

tsujan commented 3 years ago

For Remmina the only way it shows its appindicator is using the package remmina-appindicator

I just installed remmina-1:1.4.17-1 with pacman — no need to anything else.

I guess there's a bug in either a package or in the Status Notifier Plugin or there's something missing.

If the problem was in Status Notifier, it should have been reproducible here.

In case something is missing, the packagers should be told about it once it's found.

ahsand97 commented 3 years ago

For Remmina the only way it shows its appindicator is using the package remmina-appindicator

I just installed remmina-1:1.4.17-1 with pacman — no need to anything else.

I guess there's a bug in either a package or in the Status Notifier Plugin or there's something missing.

If the problem was in Status Notifier, it should have been reproducible here.

In case something is missing, the packagers should be told about it once it's found.

How it works for you and not for recently downloaded distros tested on virtual machines?? that's the thing that confuses me, you say it works but then I test a virtual machine sudo pacman -S remmina and it doesn't show its appindicator icon (just a generic one), call me crazy but there's either a bug or there's a package needed to be installed not docummented .

tsujan commented 3 years ago

How it works for you and not for recently downloaded distros tested on virtual machines?

Most probably, a package is missing from Arch's optional dependencies and, being based on Arch, those distros inherit its lack. libappindicator-gtk3 was the first thing that came to my mind but you say that you have it.

stefonarch commented 3 years ago

I just installed remmina on arch and see the generic executable icon too. Both versions of libappindicator-gtk installed. I had a similar issue with telegram some weeks ago, which I never tracked really down. In Vbox Lubuntu with LXQt 0.16 it is ok.

$ pacman -Qi remmina
....
Depends On      : avahi  libgcrypt  libssh  vte3  libsodium  libappindicator-gtk3
Optional Deps   : freerdp: RDP plugin [installed]
                  libsecret: Secret plugin [installed]
                  libvncserver: VNC plugin
                  libxkbfile: NX plugin [installed]
                  nxproxy: NX plugin
                  spice-gtk: Spice plugin
                  telepathy-glib: Telepathy plugin
                  xorg-server-xephyr: XDMCP plugin [installed]
                  gnome-terminal: external tools
tsujan commented 3 years ago

Very interesting!

I've never had a problem with Telegram's icon either. I use Manjaro Testing, which sometimes skips bad upgrades in Arch.

A missing package or a faulty one?

ahsand97 commented 3 years ago

The only log I see on the LXQT panel everytime an application "ask" to register a StatusNotifierItem (appindicator) is this:

Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «ToolTip»)
Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «OverlayIconName»)
Error on DBus request(:1.66,/org/ayatana/NotificationItem/example_simple_client): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No existe la propiedad «OverlayIconPixmap»)

There's definetely a bug, I mean....there has to be and it's not remmina cuz it works normally on other desktop environments, even with Arch based distros, and I've tested a couple of libraries to create AppIndicators yourself for different languages and all of them show correct icon in other desktop environments but the default generic one for LXQT. I've managed to create GTKStatusIcon in LXQT perfectly and all of them work well (including Remmina icon if the SatusNotifier Plugin is not in the panel) but I really prefer AppIndicators since the other one is gonna be deprecated just like the Systray Plugin of lxqt-panel

stefonarch commented 3 years ago

As I mentioned in Discussions, telegram's issue was both on debian and arch at one moment, and it solved by itself somehow.

stefonarch commented 3 years ago

Error is (translated):

Systray started
Paint error
Error on DBus request(:1.175,/org/ayatana/NotificationItem/remmina_icon): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, Property «ToolTip» inexistent)
Error on DBus request(:1.175,/org/ayatana/NotificationItem/remmina_icon): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, Proprietà «OverlayIconName» inesistente) Error on DBus request(:1.175,/org/ayatana/NotificationItem/remmina_icon): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, Proprietà «OverlayIconPixmap» inexistent) Error on DBus request(:1.175,/org/ayatana/NotificationItem/remmina_icon): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, Proprietà «AttentionIconPixmap» inexistent)

ahsand97 commented 3 years ago

Error is (translated):

Systray started Paint error Error on DBus request(:1.175,/org/ayatana/NotificationItem/remmina_icon): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, Property «ToolTip» inexistent)

That's exactly the same log I put on the report and what happens to me everytime an application asks to create an AppIndicator

tsujan commented 3 years ago

That's exactly the same log

It isn't. Yours is about example_simple_client.

To make sure that no magic happened, I installed Remmina again (has uninstalled it after the first test) and its tray icon appeared correctly inside Status Notifier.

ahsand97 commented 3 years ago

That's exactly the same log

It isn't. Yours is about example_simple_client.

To make sure that no magic happened, I installed Remmina again (has uninstalled it after the first test) and its tray icon appeared correctly inside Status Notifier.

Both logs shows same error, and yes, it works for you not for us, you can download yourself Garuda Linux LXQT or any arch + lxqt based distro and type sudo pacman -Sy remmina and it perfectly shows (just like the pictures I put) that it only shows the generic.

tsujan commented 3 years ago

In addition, I've always had these lines about solaar, while its tray icon has always been OK:

Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “ToolTip”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “OverlayIconName”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “OverlayIconPixmap”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “AttentionIconPixmap”)

So, I don't think the error is pertinent to this report.

tsujan commented 3 years ago

you can download yourself Garuda Linux LXQT or any arch + lxqt based distro and type sudo pacman -Sy remmina

No one denied your observation. It just doesn't prove that the problem you see is in Status Notifier.

ahsand97 commented 3 years ago

is there any way to debug lxqt-panel or the Status Notifier Plugin??? I'd really like to solve the problem.

you can download yourself Garuda Linux LXQT or any arch + lxqt based distro and type sudo pacman -Sy remmina

No one denied your observation. It just doesn't prove that the problem you see is in Status Notifier.

ahsand97 commented 3 years ago

In addition, I've always had these lines about solaar, while its tray icon has always been OK:

Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “ToolTip”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “OverlayIconName”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “OverlayIconPixmap”)
Error on DBus request(:1.31,/org/ayatana/NotificationItem/indicator_solaar): QDBusError(org.freedesktop.DBus.Error.InvalidArgs, No such property “AttentionIconPixmap”)

So, I don't think the error is pertinent to this report.

Just Installed solaar , generic icon

image

tsujan commented 3 years ago

Just Installed solaar , generic icon

LOL! I use it for years.

is there any way to debug lxqt-panel or the Status Notifier Plugin?

The main job is done in https://github.com/lxqt/lxqt-panel/blob/master/plugin-statusnotifier/statusnotifierbutton.cpp.

I'd do debugging if I could reproduce the issue.

ahsand97 commented 3 years ago

Just Installed solaar , generic icon

LOL! I use it for years.

is there any way to debug lxqt-panel or the Status Notifier Plugin?

The main job is done in https://github.com/lxqt/lxqt-panel/blob/master/plugin-statusnotifier/statusnotifierbutton.cpp.

I'd do debugging if I could reproduce the issue.

I can reproduce it right away with any arch + lxqt distro .iso in a virtual machine

Garuda LXQT Virtual Machine, just installed solaar , generic icon: image

stefonarch commented 3 years ago

Just tested LXQt git on debian bullseye, remmina icon is fine.

ahsand97 commented 3 years ago

Just tested LXQt git on debian bullseye, remmina icon is fine.

so it is an Arch problem 😨

tsujan commented 3 years ago

I can reproduce it right away with any arch + lxqt distro .iso in a virtual machine

@ahsand97, you don't need to repeat that. Your report is clear and everyone believes you.

ahsand97 commented 3 years ago

I can reproduce it right away with any arch + lxqt distro .iso in a virtual machine

@ahsand97, you don't need to repeat that. Your report is clear and everyone believes you.

Thanks, since you close the issue I felt forced to prove my point.

tsujan commented 3 years ago

since you close the issue I felt forced to prove my point.

Oh, closing an issue never means the end of discussion — and this page shows that ;)

Unfortunately, for a reason unknown to me, this page can't be converted to a Discussion.

so it is an Arch problem

We need more info. As I mentioned above, I use Manjaro, which is Arch-based. However, I don't use Manjaro/Arch's LXQt packages.

tsujan commented 3 years ago

Arch's (as well as Manjaro's) Qt was upgraded to 5.15.2+kde+xxx. Is it possible that recompilation was needed? My pacman log shows that I recompiled the whole LXQt a week after qt5-base-5.15.2+kde+r177-1 came here (now, it's 5.15.2+kde+r196-1).

ahsand97 commented 3 years ago

Just Installed solaar , generic icon

LOL! I use it for years.

is there any way to debug lxqt-panel or the Status Notifier Plugin?

The main job is done in https://github.com/lxqt/lxqt-panel/blob/master/plugin-statusnotifier/statusnotifierbutton.cpp.

I'd do debugging if I could reproduce the issue.

I downloaded the source code of lxqt-panel, ran cmake -B build -S . , then make and then make install DESTDIR=~/Downloads/lxqt-panel I see that in the folder ~/Downloads/lxqt-panel there's a couple of folders and inside them there is a lxqt-panel binary but when I execute it says it can't find plugins.

Is there any way to develop/test the panel without replacing my default panel binaries and files??, I was looking in the code of the file you mentioned and there's a fallback function assigning the generic icon when the desired icon fails (?) so I wanna check if something's happening but don't really know how can I compile then run/debug the panel

elviosak commented 3 years ago

Remmina shows generic icon here too, Virtualbox VM with Arch updated today, both with repo packages and AUR git packages (lxqt-desktop-git). libappindicator-gtk2 and libappindicator-gtk3 are installed.

Remmina seems to use libappindicator, but other programs that i think also use it have no problems (blueman, onboard and maybe steam?)

stefonarch commented 3 years ago

I'll update arch and recompile all LXQt today.

tsujan commented 3 years ago

I'll update arch and recompile all LXQt today.

That's a good idea. It could reveal the cause or, at least, rule out a possibility.

stefonarch commented 3 years ago

I don't anything will change recompile other components.

tsujan commented 3 years ago

I don't anything will change recompile other components.

lxqt-qtplugin is also important. Log out and in after recompiling it.

tsujan commented 3 years ago

To me, the strangest things about this situation are:

tsujan commented 3 years ago

I found these about Arch's Remmina tray icon in other DEs: https://bbs.archlinux.org/viewtopic.php?id=264275 and https://gitlab.com/Remmina/Remmina/-/issues/2434

stefonarch commented 3 years ago

I don't anything will change recompile other components.

lxqt-qtplugin is also important. Log out and in after recompiling it.

Done (without recompiling panel), no change...

Could try this but atm package-query is broken, affecting all AUR helpers

tsujan commented 3 years ago

Could try this but atm package-query is broken, affecting all AUR helpers

The same link was in my previous comment.

I firmly believe that it can't be our fault. Whether the problem is in Arch, Remmina or even GTK itself, I don't know.

stefonarch commented 3 years ago

The same link was in my previous comment.

That's where I saw it ;)

tsujan commented 3 years ago

That's where I saw it ;)

The link doesn't explain why I can't reproduce the issue with Remmina. You, @ahsand97, @slidinghotdog and I got it from Arch and still its tray icon is shown only for me!

ahsand97 commented 3 years ago

Could try this but atm package-query is broken, affecting all AUR helpers

The same link was in my previous comment.

I firmly believe that it can't be our fault. Whether the problem is in Arch, Remmina or even GTK itself, I don't know.

It has to be a problem with libappindicator then or qt cuz it only happens with lxqt for me, other desktop environments always show appindicators correctly

ahsand97 commented 3 years ago

To me, the strangest things about this situation are:

* Status Notifier's code hasn't really changed since 0.16 (see [0.16.1...master](https://github.com/lxqt/lxqt-panel/compare/0.16.1...master))

* @slidinghotdog says that other `libappindicator` icons are OK for him, while, apparently, they aren't for @ahsand97.

* And, last but not least, I see no problem whatsoever here.

For me some apps show their icon correctly, but some others dont (don't know why) , remmina, solaar and the ones I tried to do myself wih Python and Java didn't work, all of them genric icon, but some others like the notification daemon, battery, remmina-appindicator the icons were correct.

tsujan commented 3 years ago

other desktop environments always show appindicators correctly

In KDE too?

ahsand97 commented 3 years ago

other desktop environments always show appindicators correctly

In KDE too?

Manjaro KDE virtual machine, just installed remmina and solaar both appindicators work image

stefonarch commented 3 years ago

Just tested xfce4-panel and KDE on arch: remmina and solaar icon are fine. The worst is that it doesn't open from the status notifier by left click.

tsujan commented 3 years ago

@palinek, @slidinghotdog, @luis-pereira, please investigate this if you see the issue; I can't do anything because I can't reproduce it.

elviosak commented 3 years ago

looks like adding these lines here fixes it:

if (themeDir.exists(iconName + QStringLiteral(".svg")))
    nextIcon.addFile(themeDir.filePath(iconName + QStringLiteral(".svg")));

but if that's the problem i have no idea why it works for @tsujan.

elviosak commented 3 years ago

oh it does not need the "fix" with Adwaita icon theme (was using Papirus-Dark)

elviosak commented 3 years ago

tested a bit more and this looks like a Qt bug: QIcon::hasThemeIcon("org.remmina.Remmina-symbolic") is false but with QIcon testIcon = QIcon::fromTheme("org.remmina.Remmina-symbolic"); testIcon.isNull() is false and has the correct icon.

EDIT: so instead of the previous change this also fixes it: replace these 3 lines with:

nextIcon = QIcon::fromTheme(iconName);
if (nextIcon.isNull())
tsujan commented 3 years ago

@slidinghotdog, thanks for looking into it!

tested a bit more and this looks like a Qt bug: QIcon::hasThemeIcon("org.remmina.Remmina-symbolic") is false

Here, it's true, as it should be. If you're sure that it's false on your system when the icon is really installed and the icon cache is updated, then we might be able to narrow it down by comparing our systems (not an easy task though).