You are not logged in.
Pages: 1
Once I used dunst for notifications, but in this system I'm on now, I haven't installed it yet. And I'm not sure if I've installed one at all.
Anyway, for unrelated reasons, I've come across this bash command
notify-send -u critical 'Battery running out!!'
and wanted to try it out to see how it looks, but I get the error
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
so I opened Desktop notifications and read that I have to install a notification server, such as notification-daemon and create the file org.freedesktop.Notifications.service, so I've done that, but the error was the same. Upon rebooting the error changed to
GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer: unit failed.
I haven't tried yet uninstalling notification-daemon and installing dunst instead, because I'd first like to understand what the error means. (Incidentally, how does a notification popup look like with notification-daemon?)
PS: I'm on XMonad, but also have i3 installed.
Last edited by Enrico1989 (2024-01-21 16:36:56)
Offline
The daemon failed to start, can you run /usr/lib/notification-daemon-1.0/notification-daemon manually? Any errors from that?
Online
The daemon failed to start, can you run /usr/lib/notification-daemon-1.0/notification-daemon manually? Any errors from that?
What arguments I'm supposed to pass to it? Without, it just seems to wait for input
(I unsuccessfully tried with the arguments I was passing to notify-send.)
Last edited by Enrico1989 (2024-01-21 09:51:22)
Offline
None, the main part is that it doesn't crash and you can probably now use notify-send?
Online
Oh, right, I'm running the daemon and then I see if I can run notify-send, right.
Yes, I can. So I guess I have start some service? (Incidentally, if at some point I wanted to try dunst, should I undo whatever I'm gonna do now to fix the current prolem and uninstall notification-daemon?)
Offline
if at some point I wanted to try dunst, should I undo whatever I'm gonna do now
Yes.
Please post the dbus service you created (exact path and contents)
As the wiki indicates, you could also just launch /usr/lib/notification-daemon-1.0/notification-daemon in some init script, there might also be a timeout issue and only the 2nd notify-send attempt would succeed to talk the dbus activated service.
Online
Please post the dbus service you created (exact path and contents)
The content is
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemo
The actual file is in a directory I have under $HOME, but I have created a link to it via
sudo ln -s /enrico/home/path/to/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service
(that's so I can have a repo with config files and stop forgetting things)
Offline
I have under $HOME, but I have created a link
And what if you don't?
Copy it there and make it root:root/644
Online
Still the same error:
GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer: unit failed.
Offline
Exec=/usr/lib/notification-daemon-1.0/notification-daemo
Literally?
Online
No, I mis-selected from the terminal to paste here, that is not a typo in the actual file, unless you refer to something other than the missing trailing n
Last edited by Enrico1989 (2024-01-21 14:27:20)
Offline
No, meant the typo.
Do subsequent notify-send's work and is there a "notification-daemon" process after such attempts?
Online
Do subsequent notify-send's work
same as before
is there a "notification-daemon" process after such attempts?
`pidof noti` dosn't tab-complete, but you meant maybe something else?
Offline
"man pgrep", but there's likely not.
Check the system journal as to whether there're issues w/ triggering the service logged.
I've never used the notification-daemon, no idea whether it needs more setup to work in this context.
Oh, and sanity check:
PS: I'm on XMonad, but also have i3 installed.
do you use startx/xinit?
What does your xinitrc look like?
Online
`pgrep not` gives no matches.
in `journalctl` I see
Jan 21 06:41:33 redviper sudo[1144452]: enrico : TTY=pts/2 ; PWD=/home/enrico ; USER=root ; COMMAND=/usr/bin/pacman -S notification-daemon
...
Jan 21 06:51:55 redviper notification-da[1479]: cannot open display:
Jan 21 06:51:55 redviper systemd[597]: dbus-:1.2-org.freedesktop.Notifications@2.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 06:51:55 redviper systemd[597]: dbus-:1.2-org.freedesktop.Notifications@2.service: Failed with result 'exit-code'.
Jan 21 06:51:55 redviper systemd[597]: Started dbus-:1.2-org.freedesktop.Notifications@3.service.
Oh, one thing that I tried at some point was to execute one of these two
sudo systemctl restart dbus
sudo systemctl restart dbus.service
(ChatGPT's suggestion:D)
but they both managed to bring me back to the virtual console, just like killing xmonad. (I've not taken a photo of the screen, but I can try again if you think it's useful.) And I actually had to hold down the power button to turn the laptop off and rebooting it, because even moving to another VT via Alt+F3, I could inserte the username, but then the password would never be taken, as in, I could enter it and press enter, but I don't know if anything went through because there's no visual feedback when you insert the pw, nor a message come up telling me wrong password.
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
xinput set-prop 11 "libinput Tapping Enabled" 1
xset dpms 0 0 0
xset s off
picom &
$HOME/miscellaneous/setscreens.sh && nitrogen --restore
[[ "$XDG_VTNR" -eq 1 ]] && exec i3
[[ "$XDG_VTNR" -eq 2 ]] && exec xmonad
(I don't remeber what the first line is for.)
Last edited by Enrico1989 (2024-01-21 15:20:25)
Offline
I don't remeber what the first line is for.
Last link below…
Online
So nothing is wrong with it, right? The exec cmd is the last executed in any case, I'm &-ing every long-running program and I'm running a few one-shot commands, and the first line is as expected. No?
Offline
You're missing a whole lot of things
Offline
Specfically see the 2nd blue note…
Online
Specfically see the 2nd blue note…
This?
Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your ~/.xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.
Offline
Do you see any other 2nd blue notes in that paragraph?
Online
No, sorry.
Ok, so it worked. Thanks.
In case I want to try dunst, I should just delete the `org.freedesktop.Notifications.service` file and uninstall `notification-daemon` first, right?
Offline
Certainly the former to not have competing services.
Whether the notification-daemon binary hangs out on your HDD doesn't really matter.
Online
Pages: 1