dunst icon indicating copy to clipboard operation
dunst copied to clipboard

howto for fedora please correct.

Open garberw opened this issue 6 years ago • 2 comments

Installation info

  • Version: <!-- output of dunst -v -->1.3.2
  • Install type: <!-- [package|manually|...] -->package
  • Distro and version: fedora 29

as root $$ dnf install dunst to use: as user not root $ systemctl --user enable dunst.service as root: $$ cd /usr/share/dbus-1/services/ $$ ls org.knopwob.dunst.service (is this below needed?) $$ mv org.freedesktop.mate.Notifications.service org.freedesktop.mate.Notifications.service.orig (disables mate notifications daemon or whatever you use for gnome3) as user not root $ mkdir ~/.config/dunst $ cp /usr/share/dunst/dunstrc ~/.config/dunst reboot, log in as user not root; $ dbus-monitor path=/org/freedesktop/Notifications try pressing control-` (backquote) several times and see if there are any notifications there already. press control-. (period) to exit notifications or wait for them to time out. test with $ notify-send -u low help you should see a notification pop up in the upper right corner. the dbus-monitor command is for debugging. kill it with control-c when you see it is working. note: do not additionally add dunst to the system->preferences->personal->startup applications. there should only be one dunst running in the background, which comes from the service.

garberw avatar Apr 02 '19 21:04 garberw

from journalctl -b you can see that the service for dunst is started before the xserver, so no wonder it can not open the display: ......... did you write the service or did the fedora packagers ? who would know this the best?

Apr 02 16:12:19 electron systemd[2050]: Listening on Sound System. Apr 02 16:12:19 electron systemd[2050]: Listening on Multimedia System. Apr 02 16:12:19 electron systemd[2050]: Started Mark boot as successful after the user session has run 2 minutes. Apr 02 16:12:19 electron dunst[2062]: cannot open display Apr 02 16:12:19 electron systemd[2050]: Reached target Paths. Apr 02 16:12:19 electron systemd[2050]: Reached target Timers. Apr 02 16:12:19 electron systemd[2050]: Listening on D-Bus User Message Bus Socket. Apr 02 16:12:19 electron systemd[2050]: Reached target Sockets. Apr 02 16:12:19 electron systemd[2050]: Reached target Basic System. Apr 02 16:12:19 electron systemd[1]: Started User Manager for UID 1000. Apr 02 16:12:19 electron systemd[2050]: Starting Dunst notification daemon... Apr 02 16:12:19 electron systemd[1]: Started Session 2 of user garberw. Apr 02 16:12:19 electron audit[2040]: USER_START pid=2040 uid=0 auid=1000 ses=2 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_gnome_keyring acct="garberw" exe="/usr/libexec> Apr 02 16:12:19 electron audit[2040]: USER_LOGIN pid=2040 uid=0 auid=1000 ses=2 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='uid=1000 exe="/usr/libexec/gdm-session-worker" hostname=? addr=? terminal=? res=success' Apr 02 16:12:19 electron systemd[2050]: Started D-Bus User Message Bus. Apr 02 16:12:19 electron systemd[2050]: dunst.service: Main process exited, code=exited, status=1/FAILURE Apr 02 16:12:19 electron systemd[2050]: dunst.service: Failed with result 'exit-code'. Apr 02 16:12:19 electron systemd[2050]: Failed to start Dunst notification daemon. Apr 02 16:12:19 electron systemd[2050]: Reached target Default. Apr 02 16:12:19 electron systemd[2050]: Startup finished in 90ms. Apr 02 16:12:19 electron chronyd[1262]: Can't synchronise: no selectable sources Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: (--) Log file renamed from "/home/garberw/.local/share/xorg/Xorg.pid-2079.log" to "/home/garberw/.local/share/xorg/Xorg.0.log" Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: X.Org X Server 1.20.4 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: X Protocol Version 11, Revision 0 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Build Operating System: 4.19.9-300.fc29.x86_64 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Current Operating System: Linux electron 5.0.5-200.fc29.x86_64 #1 SMP Wed Mar 27 20:58:04 UTC 2019 x86_64 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Kernel command line: BOOT_IMAGE=/vmlinuz-5.0.5-200.fc29.x86_64 root=/dev/mapper/main-root ro rd.lvm.lv=main/root rd.lvm.lv=main/00 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Build Date: 26 February 2019 08:03:46PM Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Build ID: xorg-x11-server 1.20.4-1.fc29 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Current version of pixman: 0.34.0 Apr 02 16:12:19 electron /usr/libexec/gdm-x-session[2077]: Before reporting problems, check http://wiki.x.org

garberw avatar Apr 02 '19 23:04 garberw

Some notes:

$ systemctl --user enable dunst.service

Do not auto-start the dunst service, dbus should run dunst automatically when a notification is sent.

Apr 02 16:12:19 electron dunst[2062]: cannot open display

You also need to add the relevant variables to the systemd environment. In Debian this is done with

dbus-update-activation-environment --verbose --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

in a script placed in /etc/X11/Xsession.d. I'm not familiar with fedora so I can't help much here.

tsipinakis avatar Apr 03 '19 08:04 tsipinakis

Was this resolved?

bynect avatar Feb 21 '24 13:02 bynect

yes thank you did not know how to mark resolved. not a frequent blogger yet.

garberw avatar Feb 21 '24 13:02 garberw