Skip to content

System Tray on Linux

Davo edited this page Jun 20, 2024 · 57 revisions

The normal way that a user interacts with tomboy-ng is via a small yellow icon that appears on the System Tray, sometimes called the notification area. However, not all Linux Desktop Environments are able to display System Tray Icons, and some that can may not do so by default.

TrayIcon

If you can see a small, yellow icon, possibly upper right of your screen, you don't have a problem, well done in choosing a user focused Desktop. If you cannot see it, you are probably using a Desktop that may not display the System Tray, possibly a Gnome Desktop. You might be able to configured your desktop to display a SysTray or, if you prefer, use tomboy-ng with a System Tray, perhaps (easiest) by setting a Hot Key to call tomboy-ng or adding it to a dock.

Index

Gnome Desktops need gnome-shell-extension-appindicator

Firstly, Gnome Desktops using Wayland can display the SysTray Icon, they just need the Gnome plugin, gnome-shell-extension-appindicator, installed and enabled and in the case of GTK2 version, the appropriate libappindicator library (either libappindicator3-1 or libayatana-appindicator3-1 will work but versions of tomboy-ng earlier than 0.32g won't know to look for the libayatana one).

As to why the Gnome Developers make System Tray so hard, I don't know! I cannot declare that tomboy-ng depends on these additional packages because they are quite unnecessary in non-gnome desktops and there they would pull in a lot of other dependencies. So, if you use a Gnome Desktop you may need to do some manual installs.

`su -c "apt install gnome-shell-extension-appindicator" [enter]

Logout (yes, you must logout!) and back in again. Most distro now seem to ship with extensions enable, if thats the case, start tomboy-ng now and it will spot the new extension and offer to enable it for you. All should be working. OpenSuse is the exception, see below.

There is a reasonable GUI app to control extensions, search for 'extensions' under Gnome Activities. And some command line tools as well, see gnome-shell-extension-tool.

Debian Gnome

Debian with any desktop other than the default Gnome does not have any problem displaying a System Tray Icon. But if you use Gnome, sorry, read on. If you use Debian 11 or 12 you may be well advised to install the newer version from here.

Debian 11 or Bullseye with Gnome has a serious issue, the version of tomboy-ng in the Bullseye Repository cannot find a necessary library (sadly, early in 2021 Debian renamed their appindicator library just before release !). So please consider upgrading tomboy-ng. https://github.com/tomboy-notes/tomboy-ng . Then follow the gnome-shell-extension-appindicator instruction above.

Debian 12 or Bookworm and Debian 13 or Trixie work fine if you just add gnome-shell-extension-appindicator as detailed above.

Fedora Gnome

Again install gnome-shell-extension-appindicator, as detailed above. Install with this -

su -c "dnf install gnome-shell-extension-appindicator"

Note - you must logout and back in after the above install before you restart tomboy-ng. And you must restart tomboy-ng after it enables it for you.

Ubuntu Gnome

Is becoming a problem again. Lets be clear, the other desktops on Ubuntu just work. However, the introduction of Gnome 44 brought a new bug that affects the Ubuntu Repo versions of tomboy-ng. You need tomboy-ng 0,36c or later, if the appropriate repo does not have it, please consider the PPA or manually installing a newer tomboy-ng from here.

Alternatively, switch back to XOrg (logout, before entering password to log in again, click the gear symbol, lower right, and choose "Ubuntu on X11".

Ubuntu Gnome usually has the gnome-shell-extension-appindicator installed and enabled and it uses libappindicator1 (or libayana in 21.10 and beyond) library. However, in U23.04, Luna, Gnome/Wayland has introduced a new bug that leaves the Systray Menu unusable again.

Ubuntu 21.10 Gnome (way past time you upgraded) however does 'something' different, your menu from the TrayIcon pops up in apparently random places. Getting the newest tomboy-ng (v0.34) from here will solves the problem. But the version in the Ubuntu repo can be made work if you run the following commands (but probably easier to use v0.34 from here or the PPA ) -

echo "LAZUSEAPPIND=YES" >> ~/.profile

sudo ln -s /usr/lib/x86_64-linux-gnu/libayatana-appindicator3.so.1.0.0 /usr/lib/x86_64-linux-gnu/libappindicator3.so.1

The first line adds an env var your profile so that tomboy-ng knows to use the appindicator model, the second line, run as root, adds a symlink from the libayatana library to the name this library used to be called. Be careful with both commands, a mistake can be messy.

Other Ubuntu Desktops have no problems (and look vastly better, having a range of colour themes and are faster).

Open Suse Gnome

While earlier SUSE needed some care, Leap 15.4 just works "out of the box". But sadely, with OpenSuse Leap 15.5, not only is the gnome-shell-extension-appindicator not installed by default, its not available in the official repos. Google it "opensuse gnome-shell-extension-appindicator" and you will find some "community editions", I tried the most popular,seemed to work find, your choice.

Some notes - Firstly, the QT5 version is the one to use, the GTK2 tomboy-ng has (Wayland) problems. Next, you need to install the same Gnome plugin mentioned above but it does not exist (as far as I can determine) in the SUSE repository. So, you need to install it via your browser from the Gnome Extensions Web Site. When you land, the first time, on that page, you see it tells you you need to install things, firstly, a plugin into your Browser (just a couple of clicks) and, fortunately, the other component, is already installed.

Once the Extensions page is working, you need to find "AppIndicator and KStatusNotifierItem Support", usually appears on the first page. There is a nice On/Off switch top right.

Other Desktops

Generally, tomboy-ng is tested and know to work 'out of the box' with Mate, Cinnamon, budgie, Xfce, LXQt and so on.

But occasionally, we do see desktops other than Gnome have SysTray problems, almost always resolved by adding in something typically called "Notification Area" to one of your panels. Maybe right click a panel and choose "Add to Panel". Most distributions install that plugin by default.

tomboy-ng without a System Tray

If you use a system that does not allow you to have a System Tray, or you prefer not to follow the suggestions above, its possible to use tomboy-ng without a System Tray. Both ways rely on the fact that tomboy-ng, even if hidden, will see you trying to open a new instance and will step in and open its Search Window for you.

A Hot Key is pretty easy to set up on most desktops, you press a particular key combination, say, Alt-N, and tomboy-ng will either startup or switch its Search Window to your work space. See https://help.gnome.org/users/gnome-help/stable/keyboard-shortcuts-set.html.en for example of how to set it up in Gnome.

The Dock People who use a dock for example, can add tomboy-ng to that dock and use that icon in the dock to call up the possibly hidden instance of tomboy-ng. To add an app to the dock you typically start the app, when its running (and visible) you will see its icon in the dock (maybe click Activities to show the dock), right click it and choose "add to favorites", "add to dock", "pin to dash" or, something similar. Now, a click on that dock icon will either start tomboy-ng or bring its Search Window to the fore.

Still having problems ?

Hmm, starting tomboy-ng from the command line can sometime reveal extra clues about whats wrong. Further, setting an env var will make tomboy-ng a bit more "wordy" -

LAZUSEAPPIND=INFO tomboy-ng [enter]

Posting the output of that to the tomboy-ng issues list will probably help ...

Linux Desktop and Distribution Matrix

The following table, updated in April, 2024 attempts to document the problems different systems might have. Most have a workaround. Many (most?) of these issues relate to your distribution's decision to use Wayland, perhaps before its quite ready ?

  • The widget set columns refer to that widget sets ability to follow the desktops color theme.
  • Reopen refers to a note window remembering where it was previously and opening in the same place.
  • The numbers refer to the numbered "work-arounds" listed below.
Platform gtk2 Qt5 Qt6 ReOpen SysTray Conclusion
Artix Enlightenment ok ? ? ok x Only the gtk2 version has been tested.
Artix Xfce ok ? ? ok ok Only the gtk2 version has been tested.
Debian Bookworm Gnome x 1 2 3 5 Suggest Qt5 or Qt6, and follow SysTray and either Theme or Colors instructions.
Debian Bookworm Mate ok 2 2 ok ok If the colors concern you, see Colors instructions below.
Debian Bookworm KDE ok ok ok ok 6 Just learn to click the Tray Icon with Right Mouse Button. Sorry !
Fedora 39 Gnome ok 1 2 3 ? Use gtk2 or follow SysTray and either Theme or Colors instructions.
Fedora 40 beta Gnome x 1 2 3 5 to be updated.
Mageia 9 KDE ok ok ok ok ok It just works.
Mageia 9 Enlightenment ok 2 2 ok 7 Add the SysTray module.
MX Linux 21 Xfce ok ok 2 ok ok If needed, with Qt5, see Colors below.
MX Linux 23 KDE ? ? ok ok ok All OK probably
MX Linux 23 Xfce ok ? ? ok ok All OK probably
Fedora 39 Xfce ok ok ok ok ok All OK
Mint 21.3 Cinn ok ok 2 ok ok If using a Qt5 version, just install qt5ct
PCLinuxOS KDE ok ok 2 ok ok If using a Qt5 version, just install qt5ct
Ubuntu 24.04 Gnome ok 1 2 3 ok Use gtk2 or one of Theme or Colors instructions.
Ubuntu 23.04 Xfce ok 1 ok ok ok Just follow Theme instructions
Ubuntu 22.04 Gnome ok 4 x ok ok Suggest gtk2. For Qt5, depending on your distro, Plugins might help. Qt6 not recommended.
Ubuntu 20.04 Gnome ok 4 x ok ok Suggest gtk2. For Qt5, depending on your distro, Plugins might help. Qt6 not recommended.
Platform gtk2 Qt5 Qt6 ReOpen SysTray Conclusion
  1. Theme To follow theme, install qgnomeplatform-qt5 and set envar QT_QPA_PLATFORMTHEME=gnome. See themes-colors-and-settings for more information.

  2. Colors Does not follow theme but by installing qt5ct or qt6ct you can force 'a' dark theme. Less satisfactory then Theme. See themes-colors-and-settings for more information.

  3. PLATFORM We notice at least three problems often on systems using Wayland. Firstly tomboy-ng is unable to restore a note to the same position on screen it was previously. Second, you cannot copy text out of tomboy-ng to another application. Third, some Wayland using system do not bring an open note window to the foreground when it should. So, set QT_QPA_PLATFORM=xcb or provide a command line switch -platform xcb (yes, single dash). Note that all recent installs of tomboy-ng add -platform xcb to the Desktop file, so, if you launch from the menus (rather than the command line) that settings is already done for you. See setting-that-environment-variable for more information.

  4. Plugins Older Gnome systems using Wayland require you to install qt5-style-plugins (not qgnomeplatform-qt5) and QT_QPA_PLATFORMTHEME needs to be set to eg gtk2 (not gnome).

  5. SysTray Gnome opposes the use of System Tray, you must install and enable gnome-shell-extension-appindicator if you want to use it. Use your distro package manager (ie sudo apt install gnome-shell-extension-appindicator or sudo dnf install gnome-shell-extension-appindicator ), restart and then start tomboy-ng again. It will ask if it should enable the indicator, click yes. For more information, see System Tray

  6. Right Click Qt5 app only. Some systems using Wayland on KDE pop up the System Tray Menu in random places with a left click. So, for KDE systems using Wayland, we force a right click to use the menu (--allow_leftclick to override if you want to try it yourself).

  7. Module Applies to Enlightenment Desktop only. With systray module enabled and added to a shelf. Note tray icon is red, not yellow ??

[!NOTE] Both Debian Bookworm Gnome and Fedora 40 Beta Gnome did not get one 'ok' between them. Remarkable !

Thanks to Roy for some of the above testing.

Clone this wiki locally