Recent

Author Topic: [SOLVED] TTrayicon in Ubuntu Unity  (Read 17671 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 2034
    • StrumPract is the musicians best friend
[SOLVED] TTrayicon in Ubuntu Unity
« on: September 29, 2011, 11:09:43 pm »
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 ? %)
« Last Edit: November 08, 2012, 10:00:54 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: TTrayicon in Ubuntu Unity
« Reply #1 on: September 30, 2011, 08:34:14 am »
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

  • New Member
  • *
  • Posts: 19
Re: TTrayicon in Ubuntu Unity
« Reply #2 on: September 30, 2011, 11:19:11 am »
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

  • Hero Member
  • *****
  • Posts: 2034
    • StrumPract is the musicians best friend
Re: TTrayicon in Ubuntu Unity
« Reply #3 on: September 30, 2011, 01:29:30 pm »
@ 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
Quote
n 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  :'(
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

flames

  • New member
  • *
  • Posts: 5
Re: TTrayicon in Ubuntu Unity
« Reply #4 on: September 30, 2011, 06:51:33 pm »
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']“
« Last Edit: September 30, 2011, 07:00:16 pm by flames »

mdalacu

  • Full Member
  • ***
  • Posts: 214
    • dmSimpleApps
Re: TTrayicon in Ubuntu Unity
« Reply #5 on: May 09, 2012, 10:22:56 am »
For Ubuntu 12.04 LTS this workaround still works.  :D
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.
« Last Edit: May 11, 2012, 12:09:38 pm by mdalacu »

Rails

  • Guest
Re: TTrayicon in Ubuntu Unity
« Reply #6 on: May 09, 2012, 12:56:54 pm »
For Ubuntu 12.04 LTS this workaround still works.  :D
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

  • Hero Member
  • *****
  • Posts: 1048
Re: TTrayicon in Ubuntu Unity
« Reply #7 on: August 03, 2012, 10:47:05 pm »
Anyone know what is going on with tray on ubuntu 12.04? Any patches for TTrayicon which include new implementation?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TTrayicon in Ubuntu Unity
« Reply #8 on: August 04, 2012, 08:25:57 am »
For Ubuntu 12.04 LTS this workaround still works.  :D
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 :)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: TTrayicon in Ubuntu Unity
« Reply #9 on: August 07, 2012, 08:42:22 am »
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

  • Hero Member
  • *****
  • Posts: 2034
    • StrumPract is the musicians best friend
Re: TTrayicon in Ubuntu Unity
« Reply #10 on: September 14, 2012, 09:43:17 pm »
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  :'( )
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: TTrayicon in Ubuntu Unity
« Reply #11 on: September 14, 2012, 10:48:12 pm »
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

  • Hero Member
  • *****
  • Posts: 2034
    • StrumPract is the musicians best friend
Re: TTrayicon in Ubuntu Unity
« Reply #12 on: September 23, 2012, 11:36:09 am »
@ Dido : do not work  :'(
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2034
    • StrumPract is the musicians best friend
Re: TTrayicon in Ubuntu Unity
« Reply #13 on: November 08, 2012, 09:32:38 pm »
Hello everybody.
After searching a while i find a solution.

The new software Unsettings do the trick...

First install it in console:

Quote
sudo 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.
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

mdalacu

  • Full Member
  • ***
  • Posts: 214
    • dmSimpleApps
Re: [SOLVED] TTrayicon in Ubuntu Unity
« Reply #14 on: February 08, 2013, 03:10:03 pm »
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.

 

TinyPortal © 2005-2018