]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
replaced w with who as w cuts off long user names
authorChristian Autermann <christian@autermann.org>
Sun, 27 Jul 2014 13:26:07 +0000 (15:26 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 18 Aug 2014 10:56:49 +0000 (12:56 +0200)
Conflicts:
pm-utils/40autorandr

pm-utils/40autorandr

index 74549fc49a7f4e64f7f932398b5c95e965ea7b18..b8b2beebac6f385f90c6b8f4f104e6ee6001d134 100755 (executable)
@@ -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"