summaryrefslogtreecommitdiff
path: root/eclass/virtualx.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /eclass/virtualx.eclass
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index fb6a867a35cc..40eeea5463bc 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: virtualx.eclass
@@ -178,7 +178,10 @@ virtx() {
# Xvfb is started, else bump the display number
#
# Azarah - 5 May 2002
- XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
+ # GNOME GDM may have started X on DISPLAY :0 with a
+ # lock file /tmp/.X1024-lock, therefore start the search at 1.
+ # Else a leftover /tmp/.X1-lock will prevent finding an available display.
+ XDISPLAY=$(i=1; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}"
# We really do not want SANDBOX enabled here