ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Voinov <voins@voins.program.ru>
To: devel@altlinux.ru
Subject: [devel] запуск Xvfb при сборке пакетов
Date: Fri, 25 Jan 2002 13:54:22 +0300
Message-ID: <20020125105422.GA25115@voins.local> (raw)

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

Приветствую всех!

Сначала опишу ситуацию в которой код, используемый в настоящее время для
поиска свободной циферки для запуска Xvfb, не работает.

Я уже давно пересобираю все пакеты в chroot среде, к которой не монтируется
даже /proc. В связи с этим получаю /tmp, который радикально отличается от
настоящего тем, что в нём нет файла /tmp/.X11-unix/X0 в момет работы
X сервера. Т.е. тот код, который используется сейчас радостно находит
$DISPNUM==0 и считает, что Xvfb запустился. На самом деле этот сокет уже
занят, о чём Xvfb сообщает.

Предлагаю немного доработать то, что есть сейчас. У меня прекрасно
отработал следующий код:


unset XAUTHORITY ||:
unset DISPLAY ||:
DISPNUM=0
while [ -z "$DISPLAY" ]; do
	while [ -f /tmp/.X$DISPNUM-lock -o -e /tmp/.X11-unix/X$DISPNUM ]; do
		DISPNUM=$[DISPNUM+1]
		[ "$DISPNUM" != 0 ]
	done
	DISPLAY=:$DISPNUM
	%_x11bindir/Xvfb $DISPLAY &
	if  [ -f /tmp/.X$DISPNUM-lock -o -e /tmp/.X11-unix/X$DISPNUM ]; then	
		export DISPLAY
	else
		unset DISPLAY
		DISPNUM=$[DISPNUM+1]
	fi
done

-- 
Best Regards!           | Когда вам платят за работу, надо по крайней мере
Alexey Voinov           | делать вид, что вы работаете...
                        |                         Б.Виан "Осень в Пекине"
voins@voins.program.ru
voins@online.ru
vns@altlinux.ru


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

             reply	other threads:[~2002-01-25 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-25 10:54 Alexey Voinov [this message]
2002-01-25 12:18 ` Dmitry V. Levin
2002-01-25 13:14 ` Sergey Vlasov
2002-01-25 21:02   ` [devel] " Mikhail Zabaluev
2002-01-28  8:45     ` Dmitry V. Levin
2002-01-28  9:12       ` Mikhail Zabaluev
2002-01-28  9:29         ` Mikhail Zabaluev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020125105422.GA25115@voins.local \
    --to=voins@voins.program.ru \
    --cc=devel@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git