X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=contrib%2Fpm-utils%2F40autorandr;h=4d59012515821c54d630eeda5987f4b5a9653361;hb=6cd92b657027423721a29dfe0c7080483cdfc81e;hp=419722474a90278edd71b0f767722e8b4954702e;hpb=56612c27f66f78fd3622f6715f062e883939bc9a;p=deb_pkgs%2Fautorandr.git diff --git a/contrib/pm-utils/40autorandr b/contrib/pm-utils/40autorandr index 4197224..4d59012 100755 --- a/contrib/pm-utils/40autorandr +++ b/contrib/pm-utils/40autorandr @@ -5,6 +5,9 @@ exec > /var/log/autorandr.log 2>&1 AUTORANDR="autorandr -c --default default" +# Work around #44: Long user names in w +export PROCPS_USERLEN=32 + detect_display() { for X in /tmp/.X11-unix/X*; do @@ -36,6 +39,10 @@ detect_display() done } +if grep -q systemd /proc/1/comm && [ "$2" = "udev" ]; then + exec /bin/systemctl start autorandr-resume.service +fi + case "$1" in thaw|resume) detect_display