8

When attempting to display any notification with notify-send I get:

GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: 
The name org.freedesktop.Notifications was not provided by any .service files

I also noticed that $HOME/.dbus/ disappeared. It was working before although I use notify-send only via scripts that are run by cron. I have DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus in my crontab. notify-send is to notify me only in case of an emergency - and there was none as far as I know. I update my Ubuntu Desktop 22.04 LTS with apt every twelve hours, could such update be responsible for the issue? I have libnotify-bin installed. I've found people describing a similar issue but am hesitant to apply their fix as I do not know much about dbus and freedesktop.

How should I resolve this issue?

3 Answers3

6

This worked for me on Ubuntu 22.04:

sudo nano /usr/share/dbus-1/services/org.freedesktop.Notifications.service
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon/notification-daemon
1

Adding this mostly for the search engines, cause i also landed here.

This answer below still works on Ubuntu 24. No need for additionals. Your box has everything you need already installed. Dbus: look in /run/user/$uid. And before people go into the rabbit hole of apt install -y notification-daemon (old, not required) and apt install dbus-x11 (dito), please see the linked answer.

Running notify-send as root https://stackoverflow.com/a/49533938/6395261

Rob C
  • 21
0

Beside Debian based distro like Ubuntu also in RPM based like fedora same problem is persisted.

As wall command no longer works anymore we can use notify-send command.

Install the requirement to send message to another program

apt install notification-daemon

Use with:

notify-send dorood
EsmaeelE
  • 425
  • 7
  • 16