Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 54898
Collapse All | Expand All

(-)virtualx.eclass.ORG (-3 / +3 lines)
Lines 20-26 Link Here
20
20
21
	#If $DISPLAY is not set, or xhost cannot connect to an X
21
	#If $DISPLAY is not set, or xhost cannot connect to an X
22
	#display, then do the Xvfb hack.
22
	#display, then do the Xvfb hack.
23
	if [ -z "$DISPLAY" ] || ! (/usr/X11R6/bin/xhost &>/dev/null)
23
	if [ -z "$DISPLAY" ] ||  (/usr/X11R6/bin/xhost &>/dev/null)
24
	then
24
	then
25
		export XAUTHORITY=
25
		export XAUTHORITY=
26
		# The following is derived from Mandrake's hack to allow
26
		# The following is derived from Mandrake's hack to allow
Lines 32-38 Link Here
32
		export SANDBOX_DISABLED="1"
32
		export SANDBOX_DISABLED="1"
33
		
33
		
34
		local i=0
34
		local i=0
35
		XDISPLAY=$(i=0; while [ -f /tmp/.X${i}-lock ] ; do i=$((${i}+1));done; echo ${i})
35
		XDISPLAY=$(i=0; while [ -f /tmp/.X11-unix/X${i}= ] ; do i=$((${i}+1));done; echo ${i})
36
		
36
		
37
		# If we are in a chrooted environment, and there is already a
37
		# If we are in a chrooted environment, and there is already a
38
		# X server started outside of the chroot, Xvfb will fail to start
38
		# X server started outside of the chroot, Xvfb will fail to start
Lines 45-51 Link Here
45
		sleep 2
45
		sleep 2
46
		
46
		
47
		local start=${XDISPLAY}
47
		local start=${XDISPLAY}
48
		while [ ! -f /tmp/.X${XDISPLAY}-lock ]
48
		while [ ! -f /tmp/.X11-unix/X${XDISPLAY}= ]
49
		do
49
		do
50
			# Stop trying after 15 tries
50
			# Stop trying after 15 tries
51
			if [ $((${XDISPLAY} - ${start})) -gt 15 ]; then
51
			if [ $((${XDISPLAY} - ${start})) -gt 15 ]; then

Return to bug 54898