From 27be391123f5143fdccdfe975bf18bbff7517537 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 17 Oct 2011 03:53:17 -0700 Subject: startx: Choose an unused $DISPLAY by default on all platforms Now everyone can benefit from this code that I previously added for darwin https://bugs.freedesktop.org/show_bug.cgi?id=1789 Signed-off-by: Jeremy Huddleston --- startx.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/startx.cpp b/startx.cpp index 9f6561d..9135da8 100644 --- a/startx.cpp +++ b/startx.cpp @@ -130,6 +130,11 @@ if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`" fi +#else +enable_xauth=1 +#endif + +XCOMM Automatically determine an unused $DISPLAY d=0 while true ; do [ -e /tmp/.X$d-lock ] || break @@ -138,10 +143,6 @@ done defaultdisplay=":$d" unset d -#else -enable_xauth=1 -#endif - #if defined(__SCO__) || defined(__UNIXWARE__) XCOMM SCO -t option: do not start an X server -- cgit v1.2.3