Ubuntu – Is there a replacement for python-appindicator

20.04indicatorpython

AppIndicator allowed your app to create menus in GNOME, like this:

enter image description here

Specifically, with python-appindicator, you could do it in Python. However, it looks like python-appindicator is gone in the latest Linux distributions, including Ubuntu 20.04.

Is there a replacement for it? I couldn't find much.

BTW I wish the the same library worked with different desktops, like KDE and GNOME, but AppIndicator was GNOME-only, I believe.

Best Answer

  • I think python-appindicator package is deprecated and GObject bindings are recommended. There are GObject bindings for appindicators and they should be used AFAIK.

    There are two packages in ubuntu for python bindings for appindicator. One is based on libappindicator and another is based on libayatana-appindicator I donot know the core difference between the two but my guess is ayatana-appindicator is latest ones for clarity of names and are also available in other distros.

    The package names are:

    • gir1.2-appindicator
    • gir1.2-appindicator3.
    • gir1.2-ayatanaappindicator
    • gir1.2-ayatanaappindicator3.

    The 3 suffix one are for gtk3 and can be used for gtk3 related apps.

    Here is my own use case which shows my native calendar in panel. Shown below is usage in gnome-shell with kappindicator extension along with dropbox.

    Using gnome-shell Kappindicator extension along with dropbox which also uses appindicator

    Basically, for documentation see https://lazka.github.io/pgi-docs/AyatanaAppIndicator3-0.1/index.html

    P.S. The image is from fedora as I am currently in fedora desktop with gnome-shell 3.38. I think ubuntu ships with https://packages.ubuntu.com/focal/gnome-shell-extension-appindicator which can be used to show status tray and appindicators for already existing ones. I currently use it for zoom, dropbox etc