From cc8e373b1b34c7c7a207443d88201d05b7cae5b6 Mon Sep 17 00:00:00 2001 From: Asger Hautop Drewsen Date: Tue, 16 Jul 2019 17:20:05 +0200 Subject: [PATCH] Fix detection of free DISPLAYs The file `/tmp/.X0-lock` doesn't exist even though I have a display 0. However the file `/tmp/.X11-unix/X0` exists instead. --- awmtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awmtt.sh b/awmtt.sh index 9d209a2..84463fc 100644 --- a/awmtt.sh +++ b/awmtt.sh @@ -80,7 +80,7 @@ HOSTNAME=$(uname -n) start() { # check for free $DISPLAYs for ((i=0;;i++)); do - if [[ ! -f "/tmp/.X${i}-lock" ]]; then + if [[ ! -f "/tmp/.X11-unix/X${i}" ]]; then D=$i; break; fi;