Skip to content

Make start_notification_helper more robust

On feature/jessie, I see:

Jan 22 18:46:04 amnesia nm-dispatcher[2550]: /etc/NetworkManager/dispatcher.d/20-time.sh: 217: /etc/NetworkManager/dispatcher.d/20-time.sh: cannot open /proc//environ: No such file
Jan 22 18:46:04 amnesia nm-dispatcher[2550]: Script '/etc/NetworkManager/dispatcher.d/20-time.sh' exited with error status 2.
Jan 22 18:46:04 amnesia nm-dispatcher[2550]: /etc/NetworkManager/dispatcher.d/20-time.sh: 217: export: : bad variable name

… which means that in:

    GNOME_SHELL_PID="$(pgrep --newest --euid ${LIVE_USERNAME} gnome-shell)"
    export "$(tr '\0' '\n' < /proc/${GNOME_SHELL_PID}/environ | \
        grep '^DBUS_SESSION_BUS_ADDRESS=')"

$GNOME_SHELL_PID is empty. Likely NetworkManager is bootstrapping too fast and GNOME Shell isn’t running yet.

Note that there’s similar code in tails-notify-user.

Related issues

Original created by @intrigeri on 8779 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information