Tray Icon not shown in unity

Bug #789252 reported by Thomas T.
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Syncany
Fix Released
Medium
Philipp C. Heckel

Bug Description

Using Syncany with Ubuntu Natty and Unity, there does not appear a tray icon

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

Can you provide the log?

Changed in syncany:
status: New → Incomplete
Revision history for this message
Thierry Monin (teamodev) wrote :

I think it's a Unity behaviour. By default, application tray icons are "disabled" in Unity.

To show the tray icon, you have to add the application to the unity "whitelist"

Here is how to show the white list :

( all lines starting with $ have to be typed in a terminal / bash )

$ gsettings get com.canonical.Unity.Panel systray-whitelist

It outputs a list looking like :

['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service']

IMPORTANT : Copy / paste the list for your specific system !!!

To add an application, for example Dropbox, to the white list add 'Dropbox' this way to YOUR (it's important) list :

$ gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Dropbox']"

I'm still investigating to find how to add Syncany to the white list ( 'Syncany' application name doesn't work )

There is a way to enable tray icons for all the applications, but I think it's not really clean approach :

$ gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

With this command, Syncany tray icon is now visible ( maybe after disconnect / reconnect the session to restart Unity ? )

Any idea on how to solve the problem adding a 'Application Name' ???

More information :

http://www.wellengang.ch/?p=239
http://www.webupd8.org/2011/04/how-to-re-enable-notification-area.html

Revision history for this message
Thomas T. (dontpanic) wrote :

Thanks... maybe I can find something about that..

I'm wondering, why the jitsi icon (http://www.jitsi.org/) is enabled in unity, although it is not in the systray-whitelist...

Revision history for this message
Thomas T. (dontpanic) wrote :

It seems like the syncany tray icon has no application id.
If i set the whitelist to ['all'], the tray icon appears...

I checked $HOME/.xsession-errors and saw

** (<unknown>:20173): DEBUG: TrayChild Rejected: . . .

so i tried '.' as application id and it seems to work...

I'll try to fix this...

Revision history for this message
Thierry Monin (teamodev) wrote :

Same issue for me ...

with the white list set to 'all' :

$ grep TrayChild "${HOME}/.xsession-errors"

Reports :

** (<unknown>:1715): DEBUG: TrayChild Accepted: gnome-power-manager gnome-power-manager Gnome-power-manager
** (<unknown>:1715): DEBUG: TrayChild Accepted: . . .
** (<unknown>:1715): DEBUG: TrayChild Accepted: . . .

Where ". . ." is the result of a Syncany launch

Revision history for this message
Giuseppe Buzzanca (PiDy) (giuseppebuzzanca) wrote :

In unity there isn't tray icon, but app indicator (http://unity.ubuntu.com/projects/appindicators/), in other words, as write in their website:
Application indicators provide a simple and effective API to provide an application icon in the notification area in the top-right part of the screen...

should be developed a class that will be able to understand if it's in unity or less, in the first case it uses the app indicator API or a tray icon in other cases

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote : Re: [Bug 789252] Re: Tray Icon not shown in unity

So did I get it right that StatusIcons are supported, but disabled by
default? If that is the case, there are two possible solutions:

1) We write a small script that enables the icon and run this script
when Syncany is installed by the user (--> postinst hook in Debian I
think)
2) We actually use "appindicator" instead of "StatusIcon". Since there
are no classes in the "java-gnome" library (yet, apparently they are
on it [1]; that post is from yesterday!), this could be done with
python, but it would certainly not make things easier.

If possible, I vote for the first version. It's not pretty, but it's
the practical solution.

Cheers,
Philipp

[1] http://permalink.gmane.org/gmane.comp.gnome.bindings.java.devel/1488

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

I researched a bit more on this issue.

The good news: while the java-gnome library does currently not support app indicators, I found and tested a patch [1, from 2] for java-gnome that adds support for app-indicators. The bad news is that the patch is one year old and it didn't make it in the release.

I asked for details on the java-gnome-hackers mailinglist [3]. Hopefully we'll get a response soon.

Cheers,
Philipp

[1] https://sourceforge.net/mailarchive/attachment.php?list_name=java-gnome-hackers&message_id=4C0294D0.9010004%40puertogris.com.ar&counter=2
[2] https://sourceforge.net/mailarchive/message.php?msg_id=25397649)
[3] https://sourceforge.net/mailarchive/message.php?msg_id=27581728

Changed in syncany:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

My branch [1] is now using app indicators instead of status icons. I had to add a customized and custom compiled java-gnome library (bzr branch here: [2]) to the project. I've tested it on Natty 32bit and Maverick 64bit.

Could you one of you double check if it works?

[1] https://code.launchpad.net/~binwiederhier/syncany/trunk
[2] https://code.launchpad.net/~binwiederhier/java-gnome/modules

Revision history for this message
Giuseppe Buzzanca (PiDy) (giuseppebuzzanca) wrote :

Doesn't work on Natty 64bit:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/pidy/workspace/syncany/syncany/dist/lib/linux/libgtkjni-4.0.20-dev-appindicator-r806-amd64.so: libdbusmenu-glib.so.1: cannot open shared object file: No such file or directory

full log in attachment.

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

I see. That's a problem with the links in the libraries. Thanks for
reporting that Giuseppe, seems like ibdbusmenu-glib.so.1 is replaced by
ibdbusmenu-glib.so.3 in natty.

Now it definitely gets complicated: either we include the modified version
of java-gnome in the project which is ridiculous because it's huge; or we
could try to get the status icons to work. is suppose it's gonna be the
latter one ...

We could alternatively add the *.so for every distro in the trunk (which is
also very ugly) ...
Any other suggestions?

On Sat, Jun 4, 2011 at 12:00 AM, Giuseppe Buzzanca (PiDy) <
<email address hidden>> wrote:

> Doesn't work on Natty 64bit:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /home/pidy/workspace/syncany/syncany/dist/lib/linux/libgtkjni-4.0.20
> -dev-appindicator-r806-amd64.so: libdbusmenu-glib.so.1: cannot open
> shared object file: No such file or directory
>
> full log in attachment.
>
> ** Attachment added: "syncany.log"
>
> https://bugs.launchpad.net/syncany/+bug/789252/+attachment/2154154/+files/syncany.log
>
> --
> You received this bug notification because you are the registrant for
> Syncany.
> https://bugs.launchpad.net/bugs/789252
>
> Title:
> Tray Icon not shown in unity
>
> Status in Syncany:
> Confirmed
>
> Bug description:
> Using Syncany with Ubuntu Natty and Unity, there does not appear a
> tray icon
>

Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

could you guys check if the python script works for you.
it now uses app indicators on unity and gnome2 and status icons on the other platforms.

check in the trunk!

Changed in syncany:
status: Confirmed → Fix Committed
Revision history for this message
Philipp C. Heckel (binwiederhier) wrote :

I consider this fixed now.

Changed in syncany:
assignee: nobody → Philipp C. Heckel (binwiederhier)
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

Bug attachments

Remote bug watches

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