7

I am getting this error. Any idea what is wrong?

from gi.repository import Notify
Notify.init("App Name")
Notify.Notification.new("Hi").show()

GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files 

(using latest Raspbian on Raspberry Pi)

peter
  • 4,289
  • 12
  • 44
  • 67

2 Answers2

7

This solved it: :)

sudo apt-get install libnotify-cil-dev
peter
  • 4,289
  • 12
  • 44
  • 67
  • 3
    I got this during installation process: "no executable /usr/bin/cli found, but continuing anyway". Should I worry about it? Anyway I still get error: "Error showing notification:GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files" – Dr.jacky Mar 11 '17 at 09:34
  • it's cil not cli. – AbsoluteƵERØ Feb 08 '23 at 03:28
  • 1
    The context here is Python. Any `*cil*` package fetches mono. This feels much much overkill. `sudo apt-get install notification-daemon` fetches one of many options (like `notify-osd`, `lxqt-notificationd`, `dunst`, `mate-notification-daemon` or `xfce4-notifyd`). Depending on your desktop environment, you may prefer to just pick one of those options directly instead of letting apt choose. – Stéphane Gourichon Feb 24 '23 at 11:19
0

It may happen that the package notification-daemon does not install any package listed under Provided by:. On my Debian-bookworkm Lxde desktop, it said about notification-daemon:

Provided by: awesome, cinnamon, dunst, gnome-flashback, gnome-shell, lomiri,
             lxqt-notificationd, mako-notifier, mate-notification-daemon,
             notify-osd, phosh, plasma-workspace, python3-jarabe, xfce4-notify

but none of these packages were actually installed - despite notification-daemon having been installed previously.

You may need to install one of these packages. I have chosen dunst and it worked fine.

Adrian W
  • 4,563
  • 11
  • 38
  • 52