Gnome 3.26: ugly pop-up displayed by hp-systray

Bug #1721534 reported by Martin Wilck
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Fedora
New
Undecided
Unassigned
hplip (Debian)
Fix Released
Unknown

Bug Description

With GNOME 3.26, the systray has been removed for good.

http://www.omgubuntu.co.uk/2017/09/will-you-miss-gnome-legacy-tray
https://bugzilla.gnome.org/show_bug.cgi?id=785956

This has the effect that, 60s after login, hp-systray pops up an ugly dialog saying "No system tray
detected on this system. Unable to start, exiting.", which must be actively clicked by the user after every login.

Suggested "solution": acknowledge that system tray is not a necessary part of the GUI these days any more, and exit silently if the systray isn't found, at least on GNOME >3.26 (don's ask me how hp-systray is supposed to find out which environment it's running under).

Alternative "solution": Put approprieate "OnlyShowIn" tag in the autostart file (https://standards.freedesktop.org/menu-spec/latest/apb.html). But that would affect users of older GNOME versions as well as users of extensions such as TopIcon Plus with no good reason, so I'd rather not go for this solution.

Tags: gnome
Revision history for this message
Martin Wilck (mwilck) wrote :
Revision history for this message
Martin Wilck (mwilck) wrote :
Revision history for this message
Martin Wilck (mwilck) wrote :

At SUSE, we've had a bug report about the GNOME session logout hanging. We traced it down to this problem here, essentially.

In short, the user logged in to check some thing in the GUI quickly, and logged out again after less than 60s. But hp-systray would wait for the systray for 60s, and if the session terminates before that wait is over, some hp-systray processes continue living and block the logout forever.

The patches fix two things:
 a) make sure all threads exit cleanly when there's no systemtray;
 b) cut down the wait time from the current excessive 60s to 10s.

Revision history for this message
Martin Wilck (mwilck) wrote :

Sorry, the previously attached two patches need to be applied on top of this one, which SUSE applied a long time ago already in order to avoid the ugly error pop-up under GNOME.

Revision history for this message
Martin Wilck (mwilck) wrote :

It turns out that the patch from comment #2 is wrong. If GNOME is running without systray, hp-toolbox will exit after ~15s if this patch is applied because the hplip service threads have been terminated by the failing systray.

The patch from comment #3 os sufficient to fix the GNOME logout problem.

Revision history for this message
noon (fabrice-bauzac) wrote :

The hp-systray command is commonly started as part of the session's autostart; for example, in Debian.

When it doesn't find a system tray on the current environment, it displays an error dialog box.

This is the case of GNOME which has dropped support for the system tray functionality in favour of a unified "notifications" functionality, pushing developers to quit relying on a system tray.

This comes from hplip/ui4/systemtray.py where QSystemTrayIcon.isSystemTrayAvailable() returns False when run under GNOME.

Solutions I see:
- Change the /etc/xdg/autostart/hplip-systray.desktop and add a property (NotShowIn, see https://specifications.freedesktop.org/menu-spec/latest/ar01s03.html) to not start in GNOME. It simply means adding this line: NotShowIn=GNOME;
- Change the hplip code to fail silently if it detects that there is no system tray. This might hide real issues however.
- Add a new dedicated binary package for hplip-gui-systray, and do not install it by default, especially for GNOME users.
- Understand the functionality of hp-systray and implement an alternative using GNOME's notifications; choose it when running in GNOME.

Revision history for this message
noon (fabrice-bauzac) wrote :

This looks like a duplicate of https://bugs.launchpad.net/hplip/+bug/1714659 .

Changed in hplip (Debian):
status: Unknown → New
Changed in hplip (Debian):
status: New → Fix Committed
Changed in hplip (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.