I’m trying to receive a notification (in Gnome) when the network is up.
I created and set +x /etc/NetworkManager/dispatcher.d/notify-network-up.sh
with this content:
#!/bin/bash
if [ "$2" = "up" ]; then
notify-send "Network Up" "The network is now connected."
fi
exit 0
and then I enabled NetworkManager-dispatcher.service.
But it doesn’t seem to work when I disconnect and reconnect. Any idea why?
EDIT: just noticed the NM dispatcher status says “Cannot autolaunch D-Bus without X11 $DISPLAY”. I tried adding DISPLAY=:0.0 to my script but it doesn’t do anything?