Testing release
This commit is contained in:
13
notify_all
Executable file
13
notify_all
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
PATH=/usr/bin
|
||||
|
||||
XUSERS=($(who|egrep "\(:[0-9](\.[0-9])*\)"|awk '{print $1$5}'|sort -u))
|
||||
for XUSER in $XUSERS; do
|
||||
NAME=(${XUSER/(/ })
|
||||
DISPLAY=${NAME[1]/)/}
|
||||
DBUS_ADDRESS=unix:path=/run/user/$(id -u ${NAME[0]})/bus
|
||||
sudo -u ${NAME[0]} DISPLAY=${DISPLAY} \
|
||||
DBUS_SESSION_BUS_ADDRESS=${DBUS_ADDRESS} \
|
||||
PATH=${PATH} \
|
||||
notify-send "$@"
|
||||
done
|
Reference in New Issue
Block a user