12

Many 3rd party applications like Java, NodeWebkit, and Gtk2 applications don't seem to be able to display a system tray icon. Why is that? Is there a workaround?

4 Answers 4

15

elementary OS does not support GtkStatusIcon (commonly referred to as system tray), and will drop support for the Ayatana Indicator API in the next release.

GtkStatusIcon (the old API for apps to place icons in the panel) has been deprecated since 2014 and is not implemented in elementary OS. Please file a report with application developers that are still using this API requesting that they make their app function without it.

I'm a developer and I want to implement this feature.

Currently (in 0.3 Freya), only the Ayatana Indicator API is respected. However, as of 0.4 Loki, the panel will no longer implement the Ayatana API either. It is recommended in the elementary HIG that apps not explicitly use the indicator area at all.

If you're developing a music app, your app will automatically show in the sound indicator as long as it can be controlled through MPRIS.

If your app sends notifications, missed notifications will automatically be preserved in the notifications indicator (as of 0.4 Loki).

If you want to present easily accessible actions while your app is closed or not running, follow the freedesktop.org actions specification.

How can I work around this?

Try installing sni-qt. This works for some apps:

sudo apt-get install sni-qt

Another option is to install a panel that supports this old API like xfce4-panel.

2
  • How should one call the area where other applications have an icon when started, which behaves just like a tray icon? Example here.
    – user170
    Mar 12, 2016 at 19:41
  • 1
    @cipricus "System tray" refers specifically to the GtkStatusIcon API. The apps in your screenshot are using the Ayatana Indicator API (usually called "app indicators"), which is similar but not specifically what is called the "system tray". Apr 13, 2016 at 16:13
6

To get Slack and other apps to show a system tray-like icon in Wingpanel you have to update the apps .desktop file and add env XDG_CURRENT_DESKTOP=Unity to the start of the Exec key. Using Slack as an example (this works with every app I tried it on that has a system tray icon) we would do the following:

sudo nano /usr/share/applications/slack.desktop

Change the Exec key from: Exec=/usr/bin/slack --disable-gpu %U

to: Exec=env XDG_CURRENT_DESKTOP=Unity /usr/bin/slack --disable-gpu %U

3
  • Do you have idea how to put Wine System Tray into Wingpanel? Mar 29, 2017 at 23:48
  • Rocco, In my Freya slack icon appears in wingpanel in either form of a Exec=(with or without env etc) and it looks relativelly big. Maybe you know how to get rid of it or at least change its size?
    – daGo
    Oct 7, 2017 at 6:16
  • daGo, I unfortunately do not have a copy of Freya on hand to help debug, but you might find some luck editing the /usr/share/themes/elementary/gtk-3.0/apps.css, /usr/share/themes/elementary/gtk-3.0/gtk-widgets.css (under Panel in .panel or .composited-indicator, or /usr/share/icons/elementary/index.theme file. Hopefully you find what you are looking for there. Good luck! Oct 9, 2017 at 3:09
1

For those who are using Elementary OS 5 or 6:

Add repo:

sudo add-apt-repository ppa:yunnxx/elementary
sudo apt-get update

Install:

sudo apt-get install indicator-application wingpanel-indicator-ayatana

Edit configfile with your editor:

 sudo <your editor> /etc/xdg/autostart/indicator-application.desktop

Change line OnlyShowIn=Unity;GNOME; to OnlyShowIn=Unity;GNOME;Pantheon;

Save file and reboot system.

Result: enter image description here

Source: How to show app indicators on the system tray in elementary OS

Double wifi icon:

Disable by renaming this config file:

sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop.old

Reboot system to see changes.

0

Install Trayer, a GTK2 tray application:

sudo apt install trayer

and then add a command similar to this to your session:

trayer --expand false --SetDockType false --widthtype pixel --width 200 --align right --iconspacing 15

As is typical:

trayer --help

for parameter help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.