From: Christian Autermann Date: Sun, 27 Jul 2014 13:26:07 +0000 (+0200) Subject: replaced w with who as w cuts off long user names X-Git-Tag: 1.0~129 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=abd5e778d3bc39f934314b0cff5379f3e3998e57 replaced w with who as w cuts off long user names Conflicts: pm-utils/40autorandr --- diff --git a/pm-utils/40autorandr b/pm-utils/40autorandr index 74549fc..b8b2bee 100755 --- a/pm-utils/40autorandr +++ b/pm-utils/40autorandr @@ -18,7 +18,7 @@ detect_display() { for X in /tmp/.X11-unix/X*; do D="${X##/tmp/.X11-unix/X}" - user=$(w -h | awk -vD="$D" '$3 ~ ":"D"(\\.[0-9])?$" {print $1}' | head -1) + user=`who | awk -vD="$D" '$2 ~ ":"D"(.[0-9])?$" {print $1}' | head -1` if [ x"$user" != x"" ]; then logger "autorandr: Changing display configuration for user '$user'" export DISPLAY=":$D"