notify-send/notification-daemon: disable tray icon
Solution 1
As far as I can tell, you are right in attributing the system tray icon to notification-daemon
. If you are not happy with the icon, try another notification daemon. Notifications work on the basis of client/server. Any notification client can communicate with any compatible server.
I myself am using dunst
and I am very happy with that. It does not have any system tray notification.
There are several notification daemons, notification-daemon
being only one of them. In Debian, you can list them with following command:
$ apt-cache search notification | grep daemon | grep notification
dunst - minimalistic notification daemon
inosync - notification-based directory synchronization daemon
notification-daemon - daemon for displaying passive pop-up notifications
notify-osd - daemon that displays passive pop-up notifications
xfce4-notifyd - simple, visually-appealing notification daemon for Xfce
I can recommend dunst
. It is a minimalistic, yet highly configurable
notification daemon.
Solution 2
That icon has nothing, nothing to do with libnotify, nor dbus. This is entirely dependent of your DM/WM (I'm guessing cinnamon, but could be wrong) and dbus/libnotify can't do anything to control it.
For comparison: XFCE doesn't use such icon, and I'm aware that GNOME Shell does show a icon independently what method you use.
If you need to get rid of the icon, consult the documentation of your desktop environment, through if you are using a derivation of GNOME 3 it may be not possible.
Solution 3
For what it's worth, I had the opposite request. I wanted the list of notifications to show up. Turns out the default in lxde (or maybe ubuntu) is notify-osd
, which doesn't show this icon or the history of messages sent by anything, including notify-send
.
I switched it to notification-daemon
and it does exactly what I want it to do. Not sure how to hack the startup scripts or settings to get lxde
to do it automatically, but that's a solvable problem.
Related videos on Youtube
Tam Borine
Updated on September 18, 2022Comments
-
Tam Borine over 1 year
When I use
notify-send
to send a simple message tonotification-daemon
:notify-send "hello"
it not only displays the message but also creates a system tray icon, as shown on the screenshot below:
This icon will stay in the system tray until I click on it and select "clear all notifications". This icon completely defeats the purpose of
notify-send
as unobtrusive notification. I have usednotify-send
few years ago and I am sure it did not have any tray icon back than. Needles to say, this is absolutely annoying.I have found that I can use
transient
optionnotify-send --hint=int:transient:1 hello
Which makes the icon disappear after a certain time. This is better, but still not acceptable.
Is there any way to get rid of the tray icon entirely?
I am using LXDE on Debian Wheezy
Some answers suggest, this is caused by my desktop environment (LXDE).
I find it hard to believe. I still suspect this is caused by notification daemon. I have downloaded sources for
notification-daemon
package, and there in theCHANGELOG
I see, among other things:- Added better support for attaching context notifications to an icon on the system tray, even when it moves. Patch by Colin Walters.
Which seems to be the "feature" that I am complaining about.
Can anybody advice how to disable systray notification in
notification-daemon
? When I grep the sources fortray
orsystray
, I don't find anything. I don't know where to start.-
JonnyJD over 8 yearsyour tip for transient notifications is great
-
Jason over 5 yearsI added a
-t 150
after yourtransient
option which makes it disappear after 150 ms. Good enough for me.
-
Tam Borine over 9 yearsI am using
LXDE
. -
Tam Borine over 9 yearsI thought, LXDE only provides the system tray for applications to use. It is up to the applications whether/how they use the system tray.
-
Ludwig Schulze over 9 years@MartinVegter I've checked the reference again, is up to the notify server how to deal with the notifications they retrieve. I've found nothing in the reference that indicates otherwise. What I saw was that you can use hints so the item is destroyed along with the bubble, which in your case should dismiss the icon, but I figure you don't want the icon in first place either.
-
iyrin over 9 yearsYeah, that icon does not appear for me in lxpanel. I've never seen it.
-
Draif Kroneg over 9 yearsNo, the
--icon=
option is for the icon within the tooltip. -
Alind Billore over 9 yearsI think the status icon is brought by the
indicator plugin
of a panel. Remove this plugin and the status icon will disappear... along with all possibly useful indications, I guess. -
Tam Borine about 9 years@Nasha - how can I remove the
indicator plugin
? Do I have to recompile my ownlxpanel
package ? -
Alind Billore about 9 yearsI have no idea how to do that with LXDE but you don't have to recompile anything. I assume what you're looking for lies somewhere in the bottom panel properties — i.e. the bar at the bottom; under GNOME, those bars are named "panels" and from what I see in your screenshot it looks much like it. Try right clicking the bottom panel and search for "properties" or "settings". Maybe there is also a global "Settings" section in your environment's menu that links to the bottom panel properties.
-
Ludwig Schulze almost 6 years@DavidDombrowsky the icon itself is a selection of how the system you use decides. Dbus doesn't affect it, as you discovered in your own answer. The icon depends on the notification handler.
-
ComputingFroggy almost 5 yearsI am using Lubuntu 18.04 and I would like to get a notification icon with the list of notifications, as I use quite a few software generating notifications which I don't always see right away. I have tryed to install
notification-daemon
but it was already installed so nothing changed. Any other ideas on how to activate an icon with a notifications list ? -
David Dombrowsky almost 5 yearsIt's possible that the default notification handler is grabbing them. I had to make sure that all others (e.g.
notify-osd
) were REMOVED from the system, and thennotification-daemon
seems to work automatically. It shows the history of notifications also, which is nice. -
ComputingFroggy almost 5 yearsIt was
xfce4-notifyd
that was running and it did not get listed by the commandapt-cache search notification | grep daemon | grep notification
as the text is in translated in French (I am running LXDE in French). I eventually found it and removed it (and killed it). I installednotification-daemon
and started it manually with/usr/lib/notification-daemon/notification-daemon start
and it works fine now ! -
ComputingFroggy almost 5 yearsI will see after next reboot if it does not start automagically, I will add it to the autostart apps in
/etc/xdg/autostart
.