Talk:Desktop notifications
Clarification on setting up standalone environment
I just went through this for the first time and found this bit confusing:
""" In other desktop environments, the notification server needs to be launched using your WM's/DE's "autostart" option.
It can also be launched on the first call via D-Bus, adding the following configuration to its services directory /usr/share/dbus-1/services
respectively $XDG_DATA_HOME/dbus-1/services
, e.g.
org.freedesktop.Notifications.service [D-BUS Service] Name=org.freedesktop.Notifications Exec=/usr/lib/notification-daemon-1.0/notification-daemon
"""
I expected /usr/lib/notification-daemon-1.0
to exist, but it didn't. I also didn't see any systemd units containing "notif." In the end, I was able to install dusnt and things just worked when issuing notify-sent "test"
, which would indicate that that section might be either/or? If so, that would be awesome to clarify. Maybe dbus setup is one way, *or* you can install one of the other packages. Since dunst mentions it takes dbus notifications, I assumed I needed to do something to get it to work. To my knowledge, I haven't. If there is such a step, perhaps that check could be cited as well (e.g. "To ensure things are setup properly, issue this command and check for this output."). There's surprisingly little out there about notifications and openbox, so it would be great for this to be a comprehensive source for others! Jwhendy (talk) 23:23, 1 January 2018 (UTC)
- D-Bus .service files are not systemd units. (Secondly, in both DBus and systemd, user services are fully separate from system services.) grawity (talk) 23:34, 1 January 2018 (UTC)
- Alright. Now that dbus vs. systemd is clarified, should I have a
/usr/lib/notification-daemon-1.0
directory? Or is the statement "the notification server needs to be launched" accurate given that I didn't do it and things worked with dunst? Or should the page differentiate "dbus vs. the options below" if they are independent? I'm just trying to have a discussion about whether or not the page is as clear as it could be. In my view, the wiki is providing education to users. I am a novice user of this particular topic and it wasn't clear. I'm trying to have a discussion about that. Jwhendy (talk) 23:43, 1 January 2018 (UTC)
- Alright. Now that dbus vs. systemd is clarified, should I have a
- That directory is just for the "original" GNOME Classic notification-daemon. All the other implementations (xfce-notify, dunst, notify-osd...) are independent and install to different places.
- Yes, those two options are independent. DBus .service files are only an autostart mechanism, not needed for the service to work in general.
- The fact that there are several implementations of the same service means it's recommended for the DE/WM to launch the correct implementation manually, and they all should not install DBus .service files for autolaunching (because if you install multiple, it's impossible to choose which one gets autolaunched).
- Though dunst goes against this recommendation and installs a .service file anyway, so as a result running notify-send autostarts it for you. grawity (talk) 05:34, 2 January 2018 (UTC)
- Cool, and thanks for the clarification. Would you like me to take a stab at updating slightly based on this? I feel like an easy fix would be to just move dbus after the bit about "you can choose one of the following implementations." It sounds like it's just another way you can do this and thus would make sense grouped as an alternative vs. a standalone preface.
- I still don't understand if I should have
/usr/lib/notification-daemon-1.0/notification-deamon
? It seems like I should from the article (Exec=foo), so I don't understand what it would be running. - I did have to start dunst, then run the command. Sorry for the confusion. I meant that I did nothing with dbus and dunst worked independently. But you've clarified that, now, so we're good re. the other options. Jwhendy (talk) 17:31, 2 January 2018 (UTC)
/usr/lib/notification-daemon-1.0
is not a shared path – it is just a notification daemon, one of many. (You're basically asking: "Should I have /usr/bin/firefox if I want to use Chrome?") So if you only have Dunst installed but not notification-daemon, you won't have that file, and you won't need it. In your case, the D-Bus service would be/usr/bin/dunst
. grawity (talk) 17:40, 2 January 2018 (UTC)- I don't think that's what I'm asking. I wanted to understand what the dbus section was even talking about. I think now I get it: it's an example of an alternative to, e.g. adding the service to one's WM config (like .config/openbox/autostart.sh). It was not clear to me that this was an example file to create for the
notification-daemon
package. It's mentioned before that whole list, so I thought it was some way to use some built-in function of dbus to set this up. Imagine if the sentence read: "For example, if using thenotification-daemon
package listed below, one would create a file like this:" That would have answered all my questions. I didn't want to find notification-daemon given using dunst... I moved on to dunst because I didn't know that section was even talking about. What do you think about the change above? Jwhendy (talk) 18:01, 2 January 2018 (UTC)
- I don't think that's what I'm asking. I wanted to understand what the dbus section was even talking about. I think now I get it: it's an example of an alternative to, e.g. adding the service to one's WM config (like .config/openbox/autostart.sh). It was not clear to me that this was an example file to create for the