System Tray Icon must use libappindicator3
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
A year or so ago I submitted (and had accepted) a patch that allowed a Linux box to use the Unity inspired libappindicator3 if the more generic libappindicator1 is not present. Canonical have been shipping (and using) libappindicator3 on its newer Ubuntu (and friends) systems even after dropping Unity. New Ubuntus such as 19.04 do not ship libappindicator1 anymore (and cannot use it) so that patch is fine. However, older systems that have been updated to (eg) 19.04 may have an old version of libappindicator1 lying around so preferring it is a bad thing now.
So, the attached patch now chooses to use libappindicator3 even if libappindicator1 is present.
This has been tested successfully on a number of linux platforms - Unbuntu 16.04 and 18.04, 19.04 Debian 9.8 and 9.9, Mageia 6 ICEwm (but not Plasma), Fedora, openSUSE.
In some of the above cases, extra steps are required, https://wiki.freepascal.org/How_to_use_a_TrayIcon#Problems_with_newer_Gnome_based_Linux
Steps to reproduce:
On, for example a Ubuntu 19.04 install that has been upgraded from an older version of Ubuntu, run an app that has a System Tray Icon.
Alternatively, on U19.04, manually install libappindicator1.
In both cases, as both libappindicator1 and libappindicator3 is present, current LCL policy is to prefer libappindicator1 and it does not work !
Additional information:
As noted in https://wiki.freepascal.org/How_to_use_a_TrayIcon#Problems_with_newer_Gnome_based_Linux even with this patch, getting a System Tray Icon working on Fedora and openSUSE is not as easy as it should be. Ubuntu and its friends are a lot better !