Bug 1607147 - QT5 applications don't use the Status Notifier Item API in recent Fedora releases
Summary: QT5 applications don't use the Status Notifier Item API in recent Fedora rele...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt5-qtbase
Version: 28
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1601033
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-22 13:44 UTC by Robert Mader
Modified: 2018-07-27 16:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-27 16:47:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nextcloud desktop issues 203 0 None closed Unable to access gui on GNOME 3.26.2 2020-09-01 18:39:50 UTC

Description Robert Mader 2018-07-22 13:44:28 UTC
Description of problem:
QT5 on Fedora apparently uses the legacy Systray API in Fedora instead of the Status Notifier Item API.
This is problematic for gnome-shell users, because while there is a well supported gnome-shell add-on for the later(1) (which is even preinstalled in Ubuntu), a similar and very popular add-on for the legacy API is not maintained anymore (2).

This does not affect QT4 applications like Mumble, as the sni-qt package gets installed automatically AFAIK.

*1.: https://extensions.gnome.org/extension/615/appindicator-support/
*2.: https://extensions.gnome.org/extension/1031/topicons/

Version-Release number of selected component (if applicable):
qt5-5.10.1.1.28

How reproducible:
Always

Steps to Reproduce:
1. install the gnome-shell addon appindicator-support (1)
2. install mumble and nextcloud-client (or other QT apps relying on the systray)
3. start both

Actual results:
mumble shows up in the Systray
nextcloud-client does not

Expected results:
nextcloud-client should show up in the systray

Additional info:
Status Notifier Item should be supported by QT from version 5.4 on (https://blog.martin-graesslin.com/blog/tag/systray/)
Does not happen on Ubuntu 18.04

Comment 1 Rex Dieter 2018-07-22 14:59:51 UTC
Possible to come up with a reproducible test-case that doesn't involve installing gnome?

Comment 2 Rex Dieter 2018-07-22 15:13:20 UTC
In particular, what evidence do you have this is a Qt5 bug and not a bug with gnomeshell's extention you're trying to use?

For example, I can install/configure pidgin-indicator to use SNI for pidgin on plasma, it seems to work as expected for me.

Comment 3 Robert Mader 2018-07-22 22:05:10 UTC
Well I'm not sure if Plasma still has support for legacy tray icons, but the block entry from Martin Flöser above says it doesn't. Therefore, checking if the tray icon of nextcloud-client shows up in Plasma should be enough.

If it does get displayed, the next step would be to find out what goes wrong in a gnome-shell session.

The evidence I have comes down to:
 - in the setup of Ubuntu said extension works well
 - as it does for QT4 apps in fedora if sni-qt is installed
 - with the Tray Icon Plus extension, which adds support for the legacy API, the tray icon shows up. That extension is just to buggy to really use on recent releases of gnome-shell

I'll try to test if it works in Plasma asap

Comment 4 Robert Mader 2018-07-22 22:08:46 UTC
Sorry I forgot:

> For example, I can install/configure pidgin-indicator to use SNI for pidgin on plasma, it seems to work as expected for me.

Well yes, as it works on gnome-shell with the appindicator-support addon. Because it adds SNI support. The point is exactly, that QT5 apps for some reason don't have SNI support by default, as they should have. QT4 apps need the sni-qt package for that, QT5 applications should have it out of the box.

Comment 5 Robert Mader 2018-07-23 13:00:08 UTC
I just tested two applications, nextcloud-client and the systray demo app from qt (1), on Plasma, gnome-shell with top-icon-plus and gnome-shell with appindicator support.

Plasma: both work out fine

gnome-shell with top-icon-plus: both work out fine

gnome-shell with appindicator-support: nextcloud-client doesn't show a tray icon, demo app fails with the message "I couldn't detect any system tray on this system." which gets triggered by the line:  if (!QSystemTrayIcon::isSystemTrayAvailable())


Then I found out that plasma has a workaround for legacy tray-icons: the xembedsniproxy(2). But even when it is disabled, it still worked out, indicating the applications use SNI just as they should. So that seems to be a non-starter.


So from my viewpoint, there's two possibilities left:
 a) there's a bug in the appindicator-support addon, making QSystemTrayIcon::isSystemTrayAvailable() fail in QT5, while working with QT4 + sni-qt
 b) QT5 apps in gnome-shell sessions do not properly detect that they should be using SNI instead of the legacy protocol

And maybe b is just coursed a. I'll investigate that further.



*1: https://doc.qt.io/Qt-5/qtwidgets-desktop-systray-example.html
*2: https://github.com/KDE/plasma-workspace/tree/master/xembed-sni-proxy

Comment 6 Fedora Update System 2018-07-24 11:42:22 UTC
qgnomeplatform-0.4-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a5657e9770

Comment 7 Fedora Update System 2018-07-24 11:42:47 UTC
qgnomeplatform-0.4-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-61048a9a6e

Comment 8 Fedora Update System 2018-07-24 15:12:28 UTC
qgnomeplatform-0.4-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a5657e9770

Comment 9 Fedora Update System 2018-07-24 17:22:08 UTC
qgnomeplatform-0.4-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-61048a9a6e

Comment 10 Fedora Update System 2018-07-27 16:47:54 UTC
qgnomeplatform-0.4-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.