eonpatapon / mpDris2

MPRIS V2.1 support for mpd
GNU General Public License v3.0
210 stars 46 forks source link

Service fails to start on Sway WM #105

Closed ZJaume closed 6 years ago

ZJaume commented 6 years ago
jun 25 13:17:40 mpDris2[17224]:     self.timer_callback()
jun 25 13:17:40 mpDris2[17224]:   File "/usr/bin/mpDris2", line 430, in timer_callback
jun 25 13:17:40 mpDris2[17224]:     self._update_properties(force=False)
jun 25 13:17:40 mpDris2[17224]:   File "/usr/bin/mpDris2", line 674, in _update_properties
jun 25 13:17:40 mpDris2[17224]:     notification.notify(title, _('by %s') % artist, uri)
jun 25 13:17:40 mpDris2[17224]:   File "/usr/bin/mpDris2", line 809, in notify
jun 25 13:17:40 mpDris2[17224]:     self._notification.show()
jun 25 13:17:40 mpDris2[17224]: 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 (2)
grawity commented 6 years ago

If you don't have a compatible notification daemon running, disable notification support in mpDris.conf.

ZJaume commented 6 years ago

Thank you, it works!

grawity commented 6 years ago

I'm not sure what's the best way to handle this without crashing, but I think I'll add an error if notifications are enabled but org.freedesktop.Notifications isn't already present on startup (since it's a multi-provider name and relying on auto-activation for these is explicitly not recommended).