When /usr/bin/dunst is run as a normal user without a ~/.config/dunst/ directory, it attempts to find its config file in any of the directories specified in XDG_CONFIG_DIRS. (For me, that's "/home/$USER/.config:/etc/xdg".) This leads to dunst looking for its system-wide config file at /etc/xdg/dunst/dunstrc instead of /etc/dunst/dunstrc, the location where the config file is installed by the ebuild. Unsetting XDG_CONFIG_DIRS does not help in this situation as it tries to look at /usr/local/etc/xdg/dunst/dunstrc instead. Reproducible: Always Steps to Reproduce: 1. Emerge =x11-misc/dunst-1.7.3. 2. Make sure you do *not* have a ~/.config/dunst/dunstrc file. 3. Make a change to the configuration file at /etc/dunst/dunstrc. 4. Kill any existing dunst processes running for your user, and run /usr/bin/dunst again. (Preferably in the background with "nohup /usr/bin/dunst &" or similar.) Actual Results: The configuration change made does not take effect, because it is looking for the configuration file in the wrong place. Expected Results: The configuration change should have taken effect. emerge --info: Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r7, 5.4.143-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.4.143-gentoo-x86_64-Intel-R-_Core-TM-_i7-5820K_CPU_@_3.30GHz-with-glibc2.33 KiB Mem: 24604520 total, 7913396 free KiB Swap: 8191996 total, 7768316 free Timestamp of repository gentoo: Fri, 25 Feb 2022 00:45:01 +0000 sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 ccache version 4.3 [disabled] app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 2.7.18_p13::gentoo, 3.6.15::gentoo, 3.7.12_p1::gentoo, 3.8.12_p1-r1::gentoo, 3.9.9-r1::gentoo dev-lang/rust: 1.58.1::gentoo dev-util/ccache: 4.3-r3::gentoo dev-util/cmake: 3.20.5::gentoo dev-util/meson: 0.59.1-r1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.43.5-r1::gentoo sys-apps/sandbox: 2.24::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 12.0.1::gentoo sys-devel/gcc: 6.5.0-r3::gentoo, 8.4.0-r1::gentoo, 9.4.0::gentoo, 10.3.0-r2::gentoo, 11.2.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/llvm: 12.0.1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: webrsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-webrsync-verify-signature: yes sph-local location: /opt/portage-overlay masters: gentoo priority: 0 anomen location: /var/lib/layman/anomen masters: gentoo priority: 50 dotnet location: /var/lib/layman/dotnet masters: gentoo priority: 50 gambas-overlay location: /var/lib/layman/gambas-overlay masters: gentoo priority: 50 jorgicio location: /var/lib/layman/jorgicio masters: gentoo priority: 50 lmiphay location: /var/lib/layman/lmiphay masters: gentoo priority: 50 menelkir location: /var/lib/layman/menelkir masters: gentoo priority: 50 nest location: /var/lib/layman/nest masters: gentoo priority: 50 netfab-overlay location: /var/lib/layman/netfab-overlay masters: gentoo priority: 50 palemoon location: /var/lib/layman/palemoon masters: gentoo priority: 50 pentoo location: /var/lib/layman/pentoo masters: gentoo priority: 50 stuff location: /var/lib/layman/stuff masters: gentoo priority: 50 vapoursynth location: /var/lib/layman/vapoursynth masters: gentoo priority: 50 wine location: /var/lib/layman/wine masters: gentoo priority: 50 x11 location: /var/lib/layman/x11 masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /lib/udev/rules.d /usr/lib64/avfs/extfs /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask-enter-invalid --autounmask --autounmask-keep-masks y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://ftp.snt.utwente.nl/pub/os/linux/gentoo/" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en-GB" MAKEOPTS="-j10" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac aacplus acl acpi alsa amd64 amr bluray bzip2 cairo cdda cddb cdio cdparanoia cli crypt cups dbus dri dts dvd flac fluidsynth fontconfig fortran gdbm gpm gtk ibus iconv icu ipv6 jpeg libglvnd libnotify libtirpc lzma mad mmx modplug mp3 mtp multilib ncurses nls nptl ogg opengl openmp pam pcre png qt3support qt5 readline seccomp sound split-usr sse sse2 ssl startup-notification svg tcl theora tk truetype unicode v4l vdpau vim-syntax vorbis vulkan xattr xv xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9 python3_8" QEMU_SOFTMMU_TARGETS="x86_64 arm i386 mips mipsel ppc sparc" QEMU_USER_TARGETS="aarch64 alpha arm i386 m68k mips mipsel ppc sparc x86_64" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= x11-misc/dunst-1.7.3::gentoo was built with the following: USE="-wayland" ABI_X86="(64)"
Hi! Thank you for the report. I can reproduce your issue here, but I currently don't have a solution. According to upstream, setting SYSCONFDIR should be the solution, but in all my tests, it's getting ignored and according to strace, I still see it's not being used. Let's see, what upstream says. Conrad
The repo's README.md has this paragraph, which suggests that they already know of this issue: > Changing SYSCONFFILE does not affect the search for config files, meaning it > will not take effect if you choose to install dunstrc to a location that cannot > be found by the algorithm outlined in the FILES section of dunst(1). I'm not sure if they consider this a bug or not, but it does at least seem to be acknowledged.
Oh never mind, that's SYSCONFFILE, not SYSCONFDIR, my apologies >_>
The code for this in dunst-1.7.3 appears to be substantially different from the equivalent code in dunst-1.8.0, which makes it surprising that it persists in that version. However, I may have figured it out. Looking at the code for 1.8.0 (which seems to be the same in the current git commit), it looks like the add_paths_from_env() (src/utils.c, lines 450-461) function is bugged; it accepts a "env_name" parameter, but never actually uses this parameter. The routine as a whole seems to be gear towards using XDG_DATA_DIRS.
(In reply to Sophie Hamilton from comment #4) > The code for this in dunst-1.7.3 appears to be substantially different from > the equivalent code in dunst-1.8.0, which makes it surprising that it > persists in that version. However, I may have figured it out. > > Looking at the code for 1.8.0 (which seems to be the same in the current git > commit), it looks like the add_paths_from_env() (src/utils.c, lines 450-461) > function is bugged; it accepts a "env_name" parameter, but never actually > uses this parameter. The routine as a whole seems to be gear towards using > XDG_DATA_DIRS. Yes, it looks like, you are right. There is even a PR: https://github.com/dunst-project/dunst/pull/1042. I will push an update to change the default config patch and apply the patch to 1.8.0.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cea6ab5fd34b6303f54a5d64a875c51559fa118a commit cea6ab5fd34b6303f54a5d64a875c51559fa118a Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2022-02-27 23:56:27 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2022-02-28 00:03:01 +0000 x11-misc/dunst: drop 1.7.3, 1.8.0 Closes: https://bugs.gentoo.org/834050 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> x11-misc/dunst/dunst-1.7.3.ebuild | 78 --------------------------------------- x11-misc/dunst/dunst-1.8.0.ebuild | 78 --------------------------------------- 2 files changed, 156 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c02c8cd6770e3cc594e8d63f76d0a6c4c3435f4e commit c02c8cd6770e3cc594e8d63f76d0a6c4c3435f4e Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2022-02-27 23:54:00 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2022-02-28 00:03:01 +0000 x11-misc/dunst: update config path Closes: https://bugs.gentoo.org/834050 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> x11-misc/dunst/dunst-1.7.3-r1.ebuild | 79 +++++++++++++++++++++++++++++ x11-misc/dunst/dunst-1.8.0-r1.ebuild | 81 ++++++++++++++++++++++++++++++ x11-misc/dunst/dunst-9999.ebuild | 2 + x11-misc/dunst/files/dunst-1.8.0-xdg.patch | 23 +++++++++ 4 files changed, 185 insertions(+)