Adding icon to the system tray (notification area)

10,665

GtkStatusIcon is not supported in Unity.

If you need an icon displayed use Application Indicators instead. They are quite easy to handle but one drawback is that custom icons are not officially supported yet (see this question here), and that application indicators may not be available in other distributions.

In addition, defining custom icons as suggested here does not work in early versions of Application Indicators used in 10.04 LTS.

Therefore you may need that your program checks if Application Indicators are present, and in addition checks the version they have in order to get them running properly. If Application Indicators are not provided or if your application should also run in other distributions you can also use GtkStatusIcons. In this case you will have to program for both paths as was suggested here.

As far as I can see today GtkStatusIcons will still be supported when running classic GNOME Desktop in Ubuntu 11.04 but I don't know about GNOME3.

Share:
10,665

Related videos on Youtube

Moma Antero
Author by

Moma Antero

Updated on September 17, 2022

Comments