dsnap-sync: correct handling multiple users while using notify

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2019-03-14 09:23:39 +01:00
parent 22a3238fdd
commit 39fdca21cd

View File

@@ -874,7 +874,7 @@ get_snapper_sync_id () {
notify () {
# estimation: batch calls should just log
if [ $donotify -gt 0 ]; then
for u in $(users | sed 's/ /\n/' | sort -u); do
for u in $(users | sed 's/ /\n/g' | sort -u); do
sudo -u $u DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(sudo -u $u id -u)/bus \
notify-send -a $progname "$progname: $1" "$2" --icon="dialog-$3"