Commit 7369cd34 authored by Tails developers's avatar Tails developers
Browse files

Wait for notification-daemon to run before showing notifications.

Without this, the "Network card $NIC disabled" notification is
sometimes lost when MAC spoofing fails.
parent 9042c417
......@@ -15,7 +15,15 @@ TEXTDOMAIN="tails"
show_notification() {
until pgrep gnome-panel >/dev/null; do
# We must wait until all the facilities necessary for showing the
# notification to the Live user is available to prevent it from
# getting lost.
# Note: We pgrep for notification-daemon's full command because
# otherwise pgrep will look at the process name, which seems to be
# cropped to 15 chars, i.e. "notification-da". Also, we probably
# do not want to get mixed up with "gdu-notification-daemon".
until pgrep gnome-panel >/dev/null && \
pgrep --full /usr/lib/notification-daemon/notification-daemon >/dev/null; do
sleep 1
/usr/local/sbin/tails-notify-user "${1}" "${2}" 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment