When I use notify-send to send a simple message to notification-daemon:

notify-send "hello"

it not only displays the message but also creates a system tray icon, as shown on the screenshot below:

enter image description here

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 used notify-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 option

notify-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 the CHANGELOG 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 for tray or systray, I don't find anything. I don't know where to start.

  • 2
    your tip for transient notifications is great – JonnyJD Aug 16 '15 at 12:39
  • I added a -t 150 after your transient option which makes it disappear after 150 ms. Good enough for me. – Jason Aug 10 '18 at 15:14

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.

| improve this answer | |
  • I am using LXDE. – Martin Vegter Dec 21 '14 at 1:04
  • I thought, LXDE only provides the system tray for applications to use. It is up to the applications whether/how they use the system tray. – Martin Vegter Dec 21 '14 at 1:09
  • @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. – Braiam Dec 21 '14 at 1:40
  • Yeah, that icon does not appear for me in lxpanel. I've never seen it. – iyrin Dec 24 '14 at 20:16
  • 1
    @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. – Braiam May 22 '18 at 11:28

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.

| improve this answer | |

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.

| improve this answer | |
  • I 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 ? – ComputingFroggy May 20 '19 at 10:03
  • It'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 then notification-daemon seems to work automatically. It shows the history of notifications also, which is nice. – David Dombrowsky May 21 '19 at 12:58
  • It was xfce4-notifyd that was running and it did not get listed by the command apt-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 installed notification-daemon and started it manually with /usr/lib/notification-daemon/notification-daemon start and it works fine now ! – ComputingFroggy May 31 '19 at 15:14
  • I will see after next reboot if it does not start automagically, I will add it to the autostart apps in /etc/xdg/autostart. – ComputingFroggy May 31 '19 at 15:20

Use the --icon= flag with a path to a transparent image. Combine that with the short timeout and you don't see anything.

| improve this answer | |
  • No, the --icon= option is for the icon within the tooltip. – user86969 Dec 29 '14 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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