System tray menu not showing on Debian 12
On Linux (namely on Debian 12) the when start command correctly loads, starts the underlying whenever instance, and displays the system tray icon. However when the icon is right-clicked, no menus are shown and no interaction is possible with the application.
As per pystray documentation this is the behaviour of the Xorg backend, which is enabled when the appindicator and gtk backends fail. However, also making the system site-packages directories available in the module path does not fix the problem: when both python3-gi and libayatana-appindicator3-1 are made available to pystray, no tray icon is shown at all.
Since (most unfortunately) GNOME deprecates indicators, probably the solution is to make the application available as a background application on Linux when the AppIndicator protocol is not supported. The Linux background application should:
- activate a DBus interface that listens for commands
- recall the configuration box from the running instance when the
when configcommand is issued on the command line - recall the history box from the running instance when the
when historycommand is issued similarly - stop the scheduler and the wrapper application when the
when stopcommand is issued.
Looks a bit overcomplicated for a desktop app, but apparently the GNOME designers like this kind of stuff.
The problem is mitigated by making a menu form available on platforms that do not support the system tray menu.