Skip to content

Commit

Permalink
Verbesserte Erkennung der DISPLAY-Variable, leider noch nicht perfekt
Browse files Browse the repository at this point in the history
Damit es funktioniert muss w das FROM-feld ausgeben.
  • Loading branch information
prometoys committed Jan 6, 2013
1 parent f0def0c commit e876441
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dradio
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ MAX_USED_SPACE_RATE_WARN=90

USERAGENT='"Microsoft-WebDAV-MiniRedir/6.1.7600"'

USERNAME=`whoami`

# Optionale Argumente für Streamripper

OPT=""
Expand Down Expand Up @@ -196,7 +198,7 @@ if [ $MESSAGING == TRUE ] ; then
TITLE="Aufnahme $CHANNEL $LABEL"
NOTIFY_TIME="6000"
QUIET=""
export DISPLAY=`w | awk '/x-session/ || /gnome-session/ {print $3}'`
export DISPLAY=`w $USERNAME | awk '$3 ~ /:[0-9]+/ {print $3; exit}'`

if [ -n "`which notify-send`" ] && [ -n "$DISPLAY" ] ; then
notify-send "$TITLE" "$MESSAGE" -t $NOTIFY_TIME -u normal -i gtk-dialog-info
Expand Down

0 comments on commit e876441

Please sign in to comment.