[SOLVED] TTrayicon in Ubuntu Unity lazarus / 32-Linux ---------------------------------------------------------------------- Fred vS · 2011-09-29 21:09 Hello everybody. Since Ubuntu 11.04 there is a new system tray : Unity. How can i do to show a icon from TTrayicon in the Unity tray ? ---------------------------------------------------------------------- felipemdc · 2011-09-30 06:34 I don't use Unity, could you show a screenshot showing the normal system tray and the new Unity Tray? The normal Linux System Tray is standarized and available via X11 calls. If Unity introduces a new, incompatible, system tray, I suppose it will problematic for most aplications. Do other 3rd party applications (as not apps made specially for Unity) automatically appear in the Unity Tray? ---------------------------------------------------------------------- varianus · 2011-09-30 09:19 TTrayIcon works on Unity, but you have to whitelist the application if you want to allow access the system tray. In Terminal, copy and paste this command (replace MyApp with you application name) to enable an application     gsettings set com.canonical.Unity.Panel systray-whitelist “['MyApp']" or this command to enable tray for all applications     gsettings set com.canonical.Unity.Panel systray-whitelist “['all']“ ---------------------------------------------------------------------- Fred vS · 2011-09-30 11:29 @ felipemdc See, in attachement, a application, Biotray, who uses TTrayicons. One picture (trayicon_unity.jpg) is with pure Unity (and no icons appear), the other (trayicon_no_unity.jpg) is after a "sudo gnome- panel"  in terminal (it cover the new system unity tray with the old one) and then you can see the icons. @ varianus Quoten Terminal, copy and paste this command (replace MyApp with you application name) to enable an application     gsettings set com.canonical.Unity.Panel systray-whitelist “['MyApp']" or this command to enable tray for all applications    gsettings set com.canonical.Unity.Panel systray-whitelist “['all']“ Do not work for Icons from Lazarus ttrayicon ---------------------------------------------------------------------- flames · 2011-09-30 16:51 Starting with Ubuntu 11.04 they are using http://unity.ubuntu.com/projects/appindicators/ which is completely new implementation and does not work with old Systray. Samples how to code appindicators are C, C#, Python bindings only, and i don't know how to do this in Laz/fpc. There is support for old Systray, because many apps still use old Systray but user needs to whitelist application like explained in previous posts. This will work in 11.04, i don't know about 11.10, just make sure you log out/log in after you do this. Code: [Select]gsettings set com.canonical.Unity.Panel systray- whitelist “['all']“ ---------------------------------------------------------------------- mdalacu · 2012-05-09 08:22 For Ubuntu 12.04 LTS this workaround still works.  You can do the modifications using a GUI called dconf-editor: Code: [Select]sudo apt-get install dconf-tools, and then set this key : "desktop - unity - panel : systray-whitelist" to:Code: [Select] ['all'] Then logout / reboot. ---------------------------------------------------------------------- Rails · 2012-05-09 10:56 Quote from: mdalacu on May 09, 2012, 10:22:56 amFor Ubuntu 12.04 LTS this workaround still works.  You can do the modifications using a GUI called dconf-editor: Code: [Select]sudo apt-get install dconf-tools, and then set this key : "desktop - unity - panel : systray-whitelist" to:Code: [Select] ['all'] Then restart/ reboot. Do something, then reboot for it to take effect. Where have we seen that before? ---------------------------------------------------------------------- Dibo · 2012-08-03 20:47 Anyone know what is going on with tray on ubuntu 12.04? Any patches for TTrayicon which include new implementation? ---------------------------------------------------------------------- BigChimp · 2012-08-04 06:25 Quote from: Rails on May 09, 2012, 12:56:54 pmQuote from: mdalacu on May 09, 2012, 10:22:56 amFor Ubuntu 12.04 LTS this workaround still works.  You can do the modifications using a GUI called dconf-editor: Code: [Select]sudo apt-get install dconf-tools, and then set this key : "desktop - unity - panel : systray-whitelist" to:Code: [Select] ['all'] Then restart/ reboot. Do something, then reboot for it to take effect. Where have we seen that before?  Nice one. Looking at this case, perhaps restarting X Windows/X11 would be sufficient though ---------------------------------------------------------------------- Dibo · 2012-08-07 06:42 To get new tray icon work on ubuntu unity 12.04 (called "indicator"), C header (http://libappindicator.sourcearchive.com/documentation/0.2.91.1/app- indicator_8h_source.html) must be translated to Free Pascal. My C knowledge is very bad and tool H2Pas throw errors ---------------------------------------------------------------------- Fred vS · 2012-09-14 19:43 Hello everybody. I have try TTrayicon with Lazarus RC1 but, ... no luck with Ubuntu 12.04 and Unity. Any ideas ? ( ['all']  on dconf-editor do not work  ) ---------------------------------------------------------------------- Dibo · 2012-09-14 20:48 Did you tried restart system? I notify that old trayicon on ubuntu likes to crash often (for all applications which use this trayicon api) ---------------------------------------------------------------------- Fred vS · 2012-09-23 09:36 @ Dido : do not work ---------------------------------------------------------------------- Fred vS · 2012-11-08 20:32 Hello everybody. After searching a while i find a solution. The new software Unsettings do the trick... First install it in console: Quotesudo add-apt-repository ppa:diesch/testing sudo apt-get update sudo apt-get install unsettings Then open Unsettings Click on Panel tab add in white list (systray) : your_application_name save change and it is done. Ouf. ---------------------------------------------------------------------- mdalacu · 2013-02-08 14:10 In Ubuntu 13.04 the 'all' workaround will not work. Is anyone working of adding unity support for TTrayIcon, it is a very important feature. I am not capable of doing this.  Thank you. ---------------------------------------------------------------------- mdalacu · 2013-05-10 08:15 Anyone?! ---------------------------------------------------------------------- Fred vS · 2013-05-10 10:46 TTrayicon is working with Qt widgetset  (not working with GTK2) in Ubuntu-Unity 13.04. (but transparency of icon is not respected...) Of course you have to add your app in the white list (see earlier topic ). ---------------------------------------------------------------------- Thierry_Andriamirado · 2014-12-17 10:27 Doesn't work with Ubuntu 14.04.1.. : there's no systray-whitelist key (and nothing with the same meaning..) Anyone?