Fix error when no display number present in janek :0 2014-11-10 15:56
janek pts/0 2014-11-10 15:57 (:0) janek pts/1 2014-11-10 15:57 (:0) output, closes #8master
parent
181b05d116
commit
75d2c11ace
|
@ -185,7 +185,7 @@ desktop_notify() {
|
|||
fi
|
||||
|
||||
user=$(who | awk '/:0/ { print $1; exit; }')
|
||||
if [ $(id -u) -ne 0 ] && [ $(id -u "$user") -ne $(id -u) ]; then
|
||||
if [ $(id -u) -ne 0 ] && [[ "$user" != "" ]] && [ $(id -u "$user") -ne $(id -u) ]; then
|
||||
# we're neither root nor the current user on display :0.0,
|
||||
# so don't show any notification
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue