Bug 1601033

Summary: QT tray icons / appindicators do not work when qgnomeplatform is installed
Product: [Fedora] Fedora Reporter: Dan Callahan <dan.callahan>
Component: qgnomeplatformAssignee: Germano Massullo (Thetra) <germano.massullo>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dan.callahan, germano.massullo, jgrulich, m, nonamedotc, robert.mader, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qgnomeplatform-0.4-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-27 16:47:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1607147    
Attachments:
Description Flags
Screenshot showing the tray icon being present and absent none

Description Dan Callahan 2018-07-13 16:05:27 UTC
Description of problem:

- KeePassXC does not display a tray icon

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

- keepassxc-2.3.3-1.fc28

How reproducible:

- Always

Steps to Reproduce:

1. Install the "(K)StatusNotifierItem/AppIndicator Support" extension for GNOME Shell: https://extensions.gnome.org/extension/615/appindicator-support/
2. dnf install keepassxc
3. Launch KeePassXC
4. Navigate to Tools -> Settings -> General -> Basic Settings
5. At the bottom, enable "Show a system tray icon"
6. Click OK 

Actual results:

- No tray icon appears

Expected results:

- A tray icon appears in the top right of the monitor

Additional info:

- The tray icon *does* appear and work when using the upstream AppImage from https://keepassxc.org/download/, so this must be some discrepancy between how the AppImage is built and how the Fedora RPM is built.

- Upstream GitHub repo at https://github.com/keepassxreboot/keepassxc
- Upstream AppImage build script at https://github.com/keepassxreboot/keepassxc/blob/develop/AppImage-Recipe.sh

Comment 1 Germano Massullo (Thetra) 2018-07-13 16:18:36 UTC
Hi Dan, could you please provide screenshots of both working and not working situation?
I am not a GNOME user so it would be helpful to give a look to pictures

Comment 2 Dan Callahan 2018-07-13 17:21:56 UTC
Created attachment 1458771 [details]
Screenshot showing the tray icon being present and absent

Sure! Screenshot attached. Thank you for the quick response.

Things are currently a bit weird with tray icons in Gnome. They've been removed from the platform as of Gnome 3.28, but Canonical is maintaining an extension (linked in the steps to reproduce) that effectively restores support via a different protocol.

Apparently a lot of upstream libraries incorrectly detect which methods are supported (legacy tray icon vs. KStatusNotifier vs AppIndicator). For example, Electron apps like Slack need to be launched with XDG_CURRENT_ENVIRONMENT=Unity to work with the extension, otherwise it tries and fails to use a legacy GTKStatusIcon. Further discussion at https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/127

...which is all to say, this is probably a really weird interaction between the environment and the upstream libraries.

Comment 3 Kevin Kofler 2018-07-18 23:30:21 UTC
This might be caused by the QGnomePlatform platform plugin that Fedora ships. You can try uninstalling the qgnomeplatform package, or setting QT_QPA_PLATFORMTHEME=kde (or something else other than "gnome"), though I'm not sure whether the platform theme actually needs to exist for the environment variable to work (the KDE one is in the plasma-integration package).

Comment 4 Dan Callahan 2018-07-20 13:06:33 UTC
Removing qgnomeplatform fixes this (at the cost of platform integration).

Installing plasma-integration and setting QT_QPA_PLATFORMTHEME=kde does change the visual theme of the application, but does not fix the missing tray icon.

...so it sounds like the bug is somewhere in qgnomeplatform, and not necessarily in the theme code.

Comment 5 Dan Callahan 2018-07-20 13:09:21 UTC
Weird observation: with QT_QPA_PLATFORM=kde, keepassxc behaves as if it has a tray icon (closing the window does not terminate the process), but there is no actual tray icon visible on the screen.

(Changing the theme and observing this behavior *does* require that plasma-integration is installed. Without it installed, the process terminates as soon as the main window is closed.)

Comment 6 Dan Callahan 2018-07-20 13:54:18 UTC
Moving this over to the qgnomeplatform component, and adding its owner (jgrulich) to CC.

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

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

Comment 9 Robert Mader 2018-07-24 12:25:43 UTC
Alright, I can confirm the update from https://bugzilla.redhat.com/show_bug.cgi?id=1601033#c8 fixes the problem

Comment 10 Fedora Update System 2018-07-24 15:12:32 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 11 Fedora Update System 2018-07-24 17:22:12 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 12 Fedora Update System 2018-07-27 16:47:58 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.