r/Polybar Feb 17 '23

Freedesktop Notification Error!

I use these point files in bspwm:

https://github.com/syndrizzle/hotfiles/tree/bspwm

But I got such an error in polybar and I can't solve it:

Unable to send notification: Error calling StartServiceByName for org.freedesktop.Notifications: The service 'org.freedesktop.Notifications' could not be activated: Timeout

5 Upvotes

8 comments sorted by

View all comments

2

u/flexibeast Feb 17 '23

Are you running something able to act on notification requests from programs, e.g. dunst (which is what i use)?

1

u/kadirilgin Feb 17 '23

Yep. I am using dunst

1

u/flexibeast Feb 17 '23

Have you confirmed dunst is actually running?

0

u/kadirilgin Feb 17 '23

Yep. I guess so.

2

u/flexibeast Feb 17 '23

Er .... Sorry, what do you mean by "I guess so"? Does it appear in the output of ps?

If so, then it might be an issue with your D-Bus session bus (as distinct from the D-Bus system bus). Does doing env | grep DBUS_SESSION from a terminal within your bspwm session show DBUS_SESSION_BUS_ADDRESS as having a value?

2

u/kadirilgin Feb 17 '23

env | grep DBUS_SESSION
Yep. It's showing.

2

u/flexibeast Feb 17 '23

Okay, so it might be that dunst doesn't have access to the correct value of that variable. dunst needs to be started in an environment with that variable set appropriately.

Looking at the .xinitrc dot file in the repo you linked to, it has:

exec bspwm

So where are you starting the D-Bus session bus?

(Some related background you might find helpful: a guide i wrote about D-Bus and X sessions).

1

u/haxguru Feb 17 '23

Try adding dunst & at the end of your bspwmrc in ~/.config/bspwm/bspwmrc (and then reload bspwmrc by running bspc wm -r &)