- Package:
- needrestart
- Source:
- needrestart
- Submitter:
- Roland Rosenfeld
- Date:
- 2026-04-09 11:41:01 UTC
- Severity:
- normal
- Tags:
Dear Maintainer, some months ago needrestart topped sending notify events on my system and instead run into a timeout. Today I debugged this issue and found out, that the command su -p -s /bin/sh -c "$NSEND -a needrestart -u critical -i dialog-warning \"$MSGTITLE\" \"$MSGBODY\"" "$NR_USERNAME" in /etc/needrestart/notify.d/400-notify-send does not work correct on my system, if DBUS_SESSION_BUS_ADDRESS is unset. Simply exporting DBUS_SESSION_BUS_ADDRESS, which is already evaluated in line 32 of the script, but not exported, solved the issue for me. A patch is attached. I'm not sure, what triggered breaking the function for my system (I'm quite sure, that it worked correct some time ago). Maybe the problem is triggered by using tcsh as user shell (but I use this shell for ages). Since the above minimal patch solves the issue for me, it may be a good idea to apply it :-) Greetings Roland
I have had the same problem as Roland for a long time and today I finally decided to troubleshoot it. Quickly came to the conclusion that notify-send was the culprit. Through trial and error I added this to my 400-notify-send script to get it working: export XDG_RUNTIME_DIR=$(sed -z -n s/^XDG_RUNTIME_DIR=//p "/proc/$NR_SESSPPID/environ") Then I found this bug and I tried Rolands solution and it also works for me. I have no idea which solution may be more appropriate or not. I run KDE and this is Debian Bullseye (currently Debian stable) but the 400-notify-script has not changed between the releases (except whitespace and comments). Regards Andreas
I've stumbled upon this issue after upgrading to bookworm. In my case the timeout was both due to pam_mount and Roland's missing session environment case. Fixed both by replacing `su` invocation with: runuser -p -l -u "$NR_USERNAME" -- "$NSEND" -a needrestart -u critical -i dialog-warning "$MSGTITLE" "$MSGBODY"
We believe that the bug you reported is fixed in the latest version of
needrestart, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1024426@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Patrick Matthäi <pmatthaei@debian.org> (supplier of updated needrestart package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 03 Apr 2024 10:57:04 +0200
Source: needrestart
Architecture: source
Version: 3.6-8
Distribution: unstable
Urgency: medium
Maintainer: Patrick Matthäi <pmatthaei@debian.org>
Changed-By: Patrick Matthäi <pmatthaei@debian.org>
Closes: 1024426 1040673 1063155 1063719
Changes:
needrestart (3.6-8) unstable; urgency=medium
.
* Merge 3.6-4+deb12u1 changelog.
* Add patch 08-uninitialized-vars-arm from George Robbert to fix warnings on
arm and some amd64 systems.
Closes: #1063719
* Add patch 09-recognize-versioned-ruby-interpreter from Helmut Grohne to
detect also versioned ruby interpreters.
Closes: #1063155
* Add patch 10-notify-send-timeout from Michał Mirosław to fix a timeout in
notify-send.
Closes: #1024426
* Add patch 11-spelling-error from David Weinehall to fix a spelling error.
Closes: #1040673
Checksums-Sha1:
838e6bc8954ab0fb67d71a313dd8aafff886f37e 1820 needrestart_3.6-8.dsc
16e30b8c5ca9fb164587c1a18cbcceec3afa9d40 71159 needrestart_3.6.orig.tar.gz
57a8f40307f6d8ea43e9bad3857b09b5eec314b0 13588 needrestart_3.6-8.debian.tar.xz
d468e0a3a05516955b786fdb57ee5631981804c7 6375 needrestart_3.6-8_source.buildinfo
Checksums-Sha256:
5f46cd70904879b3a7d45c38cea7a1b0bfedf93b2ffefc026ff9117a9a8ace27 1820 needrestart_3.6-8.dsc
3dced40d6116287b163da018d57014b0b7cee04794a95f8602126e2c296ed1a7 71159 needrestart_3.6.orig.tar.gz
b0d648385bf0e24320e89af68a99a4da52b00d88fc6848753440d2d47f2dbd0a 13588 needrestart_3.6-8.debian.tar.xz
b89ce798ab87f1fb89348e3d09108994873ec0b7de357c978e51b0c9e5a5fded 6375 needrestart_3.6-8_source.buildinfo
Files:
22bf24a66e0d0414b099c02528384f2f 1820 admin optional needrestart_3.6-8.dsc
8ea62680286b44f7c1ffb8298ed99385 71159 admin optional needrestart_3.6.orig.tar.gz
ddebbb738df40fe7b67644952974d8aa 13588 admin optional needrestart_3.6-8.debian.tar.xz
e4263bda59d69dcd74bd1d46d2b5be81 6375 admin optional needrestart_3.6-8_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEWKA9xYJCWk3IuQ4TEtmwSpDL2OQFAmYNG20ACgkQEtmwSpDL
2ORTLA/+OXbm9Ncz20HtrJEHhDsnzGeys9aWGWHgv6M9uootl/jJB8T3A6UusEVA
ADUe3Iq2Lz6se36XnZOoiRSbJ+ZbF06ixI3KMSNu7gwePsbd+bfww38VvP3RWMZ2
tggjada8FhSW1I75/31LvLna3Xsip6/OPfyKzg1T9pwBqAkV6zwddZK+IR7iOatn
q+MgRl1nhw/4Kmnk162FiuO67DPKQLDtBZ2P793G7sTgVFm+lHzQKtm83CUA4NYE
74iedqvLHuDS3mZXYnfMx+4NGNBW7i0H0CR1ogRS9UK8+hYlEzsTaUupkGVybdCF
mVvgdEtq+MkxYJueSEpjYnRwY2QG3B4sCqkpb/yUQoGHjtrG5L/rg0MKk4FWEG+u
cbDjOPZaIkmE7ksHGIPPsWIlZ4x3SWKIsQlsWeGVdgLJeK/daRohy0eDKoN03dcF
gwk5UKJ+In3sQe1KFbJui+z3qaL+Drg3tT22SElMHyaMi45hqqmhLTfCQWrB1dxk
NXAP1+FYoBhV6YqcJ82Z4YhMlJERb3txPUHaXTjk6QwnrJc1Nrla0fG/HV9RGb2v
78QkBVB7yAF/RUZZNc+NUn9MtHQo18QA84Nru0/pxlAHRnrltggQK4oJnhKuilBs
YUi7HPixu01Ugj6hNap6FVhxMgOp3hKiNa2IyCNiln0MLB0rvIg=
=0SBi
-----END PGP SIGNATURE-----