summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-17 03:53:17 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-17 03:54:40 -0700
commit27be391123f5143fdccdfe975bf18bbff7517537 (patch)
tree10a01fd283dad202774c50d2e8c747a362bb0a3e
parent45cc81cd7abafe61bddb3ddce9f4fb8a9aa06c12 (diff)
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 <jeremyhu@apple.com>
-rw-r--r--startx.cpp9
1 files 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