14

In older versions of Ubuntu, /usr/share/dbus-1/services/org.freedesktop.Notifications.service could be edited to change the default notification daemon.

However changing this file no longer affects the default notification daemon in the newer version. Any ideas on how to change the default notification daemon?

Alex
  • 193

2 Answers2

22

It seems there is no priority or a single setting point to set which freedesktop notification daemon to run. I got such problem with XFCE installed on Ubuntu 14.04.

Unity notification launch xfce4-notifyd as it was the default.

  • Check for available notification services, example:

    $ grep -r org.freedesktop.Notifications /usr/share/dbus-1/services/
    /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service:Name=org.freedesktop.Notifications
    /usr/share/dbus-1/services/org.freedesktop.Notifications.service:Name=org.freedesktop.Notifications
    
  • Disable non needed ones, leave only the one you want:

    sudo mv /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service.disable
    
    pkill xfce4-notifyd
    
  • Check

    notify-send test
    

Unity notification style back (notify-osd)

Another way, Unity does not launch any default notifications daemon. So you can add the one you like to startup applications. See How do I start applications automatically on login?. I think it's better because it does not affect other desktop session that relays on the service file to start their notifications daemon.

Helpful Reference:

user.dz
  • 48,105
  • 1
    This looks great, but on my Bionic 18.04 system, the grep line doesn't find any notification services. But I am properly getting notifications. Has something relevant changed in the last few releases? – nealmcb Nov 03 '18 at 16:38
  • Ah - makes sense. My real goal is just to figure out what is showing my notifications these days so I can get it fixed so it can log timestamps and events. Amazing to me that with all the logging going on in Linux, User-visible notifications don't get logged. Any tips? The existing answers on those questions are either old (e.g. for notify-osd) or haven't worked for some other reason. – nealmcb Nov 03 '18 at 21:17
  • 2
    @nealmcb, so you are looking for Gnome, Use D-feet tool and check which tool takes org.freedesktop.Notifications address. – user.dz Nov 03 '18 at 21:53
  • 1
    This solution worked today in Ubuntu 18.04 and it was the only solution in order to stop notifications from stealing focus, I am using i3WM and after installing Budgie DE for testing, the notifications started appearing beautiful but stealing focus, which stopped the workflow so I had to do this with the budgie notification service. Thank you very much. – Geppettvs D'Constanzo Nov 14 '19 at 20:05
0

To begin need to say that behavior is reason to decide it is incorrect work of NotifyOSD with Compiz or Metacity what depends on your preferences. It can be also result of change desktop manager (alike GDM). So better solution for you will be better details what you want to do and where. "Where" is where your NotifyOSD server have works.

So if your details is Unity solutions is:

killall notify-osd
notify-osd

or if above trial was unsuccessful so you can try resolve most common environment:

sudo apt-get build-deps unity

Let's to find answer together.

swift
  • 3,281
  • 2
  • 23
  • 46