You are not logged in.
snixembed - proxy StatusNotifierItems as XEmbedded systemtray-spec icons
Use case: you use chromium/electron 8/some other application that only supports StatusNotifierItem/AppIndicator and the tray icon doesn't show up.
Works best with minimal window managers, most large DEs have their own SNI/AI support, and this should be preferred over snixembed.
EDIT: recent electron versions have rolled back to the old icon implementation, so it should work without snixembed again.
Usage: run
snixembed --fork
from your .xprofile or such.
More info and code: see https://git.sr.ht/~steef/snixembed
Matrix room: #snixembed:matrix.org
AUR package: https://aur.archlinux.org/packages/snixembed-git
ORIGINAL MESSAGE (edited since this shows up as top result instead of the actual home page):
With the release of electron 10, support for the systemtray icon spec was deliberately dropped in favour of StatusNotifierItem, making the tray icons from e.g. riot-desktop not show up on my patched dwm bar. I slapped together a proxy of sorts that talks a sliver¹ of SNI and creates icons using the systemtray icon spec (using deprecated GtkStatusIcon).
Usage: run "snixembed --fork"² from your .xinitrc or similar.
Code and more info: https://git.sr.ht/~steef/snixembed
PKGBUILD: https://aur.archlinux.org/packages/snixembed-git
I'm currently using it for riot-desktop and signal-desktop without issue.
A word of warning: since libappindicator seems to just assume the service talks AppIndicator instead of SNI (and I honestly can't find a specification for AppIndicator), applications relying on that may not show a tray icon or even crash snixembed. Exporting XDG_CURRENT_SESSION=KDE and KDE_SESSION_VERSION=5 seems to help in the case of telegram-desktop.
I'd be happy to hear if anyone ends up using, breaking, or improving it!
Steef
¹ So far I basically only implemented what I need, and it will most likely crash on everything else.
² This will exit once the forked service is set up, this is useful since electron apps usually (wrongly) only check for its availability on startup and then silently fail if it's not there.
EDIT: Just released 0.2.0: snixembed now supports probably everything SNI you'll find in the wild (icons by pixmap or name, tooltips, context menus, activation) and in particular it now supports everything QSystemTrayIcon does, so running snixembed won't break your Qt applications now (thanks to zoof for reporting and testing). It still doesn't fly with libappindicator though (in my eyes it's their fault, but I plan to look into supporting their protocol since it's in use).
Version 0.3.0: D-Bus calls are now async, so other software now makes snixembed hang less.
Last edited by Steef435 (2020-06-07 23:31:55)
Offline
Hello,
first of all, thank you for the utility. It works for signal-desktop. However, the moment I run it, icons for some other programs disappear: at least redshift-gtk, slack-desktop, blueman-applet and MS Teams. This is under XFCE desktop (xfce4-panel - Notification Area plugin).
Offline
Hi, could very well be those applications use libappindicator. As I wrote above, those icons don't work with snixembed. So far the only workaround seems to be to let either snixembed and the applications that rely on it, or to let all libappindicator applications connect to a separate D-Bus session bus. See the README at https://git.sr.ht/~steef/snixembed. But this will obviously break other stuff for the applications on the separate bus. If you only need snixembed for signal-desktop though, it may be a worth a try to let snixembed and signal-desktop be on a different bus, at the cost of notifications and whatnot.
It's nontrivial to also support libappindicator since they haven't really documented their spec anywhere AFAIK (apart from the xml interface buried in their code), but I'll see what I can do.
Offline
fluke571, I just hacked in _minimal_ appindicator support and pushed it to the repository. Icons should show up and change properly, and context menus should work on right mouse click. Is there any more needed for your use case?
EDIT: I've noticed that in the case of Skype, a restart of Skype is needed for Gtk to pick up the correct icon from the icon theme provided by Skype. With other applications it instantly works. Honestly I'm about to blame this on Gtk's tendency to cache stuff it shouldn't, and there being no way to forcefully bypass the cache.
Last edited by Steef435 (2020-04-06 16:22:23)
Offline
Not sure how many people found this through here - but with the latest electron version, it has rolled back to the old tray icon implementation.
This means that snixembed is no longer necessary for recent electron apps. AFAIK snixembed is only useful for chromium tray icons now, which I at least don't use.
I will still watch bug reports for people that rely on it still.
Offline