From: "Andriy Dobrovol's'kii" <dobr@iop.kiev.ua>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: [mdk-re] Как запустить два Х двумразным пользователям одновременно
Date: Thu Dec 13 12:09:04 2001
Message-ID: <3C186FEB.1020001@iop.kiev.ua> (raw)
In-Reply-To: <20011213103030.A7385@lic145.kiev.ua>
Можно ли этот вариант сделать основным в дистрибутиве и вообще?
Всего,
Андрей
Michael Shigorin wrote:
> On Thu, Dec 13, 2001 at 10:14:09AM +0300, John wrote:
>
>>Как запустить два Х двум разным пользователям одновременно? Что писать?
>>
> startx -- :N
> где N=0,1,... (и 0 по умолчанию)
>
> Или см. аттач -- мой startx сам разбирается ;)
>
>
>
> ------------------------------------------------------------------------
>
> #!/bin/sh
> #
> # (c) 1999 Red Hat Software, Inc.
> # patched by Michael Shigorin <mike@altlinux.ru>
> # to open new displays automagically
>
> bindir=/usr/X11R6/bin
>
> userclientrc=$HOME/.xinitrc
> userserverrc=$HOME/.xserverrc
> sysclientrc=/etc/X11/xinit/xinitrc
> sysserverrc=/etc/X11/xinit/xserverrc
> clientargs=""
> serverargs=" -quiet "
>
> TMPDIR=${TMPDIR:-/tmp}
>
> if [ -f $userclientrc ]; then
> clientargs=$userclientrc
> else if [ -f $sysclientrc ]; then
> clientargs=$sysclientrc
> fi
> fi
>
> if [ -f $userserverrc ]; then
> serverargs=$userserverrc
> else if [ -f $sysserverrc ]; then
> serverargs=$sysserverrc
> fi
> fi
>
> # select next free display...
> if [ -n "`ls /tmp/.X*-lock 2>/dev/null`" ]; then
> display=:$[1+0$(ls /tmp/.X*-lock | tail -1 | sed -n 's/.*X\([[:digit:]]\+\)-lock$/\1/p')]
> else
> display=:0
> fi
>
> whoseargs="client"
> while [ "x$1" != "x" ]; do
> case "$1" in
> /''*|\.*) if [ "$whoseargs" = "client" ]; then
> if [ "x$clientargs" = x ]; then
> clientargs="$1"
> else
> clientargs="$clientargs $1"
> fi
> else
> if [ "x$serverargs" = x ]; then
> serverargs="$1"
> else
> serverargs="$serverargs $1"
> fi
> fi ;;
> --) whoseargs="server" ;;
> *) if [ "$whoseargs" = "client" ]; then
> clientargs="$clientargs $1"
> else
> case "$1" in
> :[0-9]) display="$1"
> ;;
> *) serverargs="$serverargs $1"
> ;;
> esac
> fi ;;
> esac
> shift
> done
>
> # set up default Xauth info for this machine
> mcookie=`mcookie`
> serverargs="$serverargs -auth $HOME/.Xauthority"
> xauth add $display . $mcookie
> xauth add `hostname -f`$display . $mcookie
>
> # remember which VC will be occupied by X to deallocvt it later
> XINITLOG="$TMPDIR"/.startx-$HOSTNAME$display
> while [ -e "$XINITLOG" ]; do
> XINITLOG="$TMPDIR"/.startx-$HOSTNAME$display-$RANDOM
> done
>
> # here's the race :(
>
> # protect logfile
>
>>"$XINITLOG"
>>
> chmod 600 "$XINITLOG"
>
> xinit $clientargs -- $display $serverargs 2>&1 | tee -a "$XINITLOG"
>
> # clean up
> deallocvt $(sed -n -e 's/^(using VT number \([[:digit:]]\+\))/\1/p' "$XINITLOG") 2>/dev/null
> rm -f "$XINITLOG"
>
next prev parent reply other threads:[~2001-12-13 12:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-13 10:10 John
2001-12-13 10:53 ` Vyt
2001-12-13 11:02 ` [mdk-re] " John
2001-12-13 11:39 ` Andriy Dobrovol's'kii
2001-12-13 11:36 ` [mdk-re] Как запустить два Х двум разным " Michael Shigorin
2001-12-13 12:09 ` Andriy Dobrovol's'kii [this message]
2001-12-13 13:00 ` [mdk-re] Re: [mdk-re] Как запустить два Х двумразным " Phoenix
2001-12-13 14:46 ` [mdk-re] [JT] Как запустить два Х двум разным " Michael Shigorin
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=3C186FEB.1020001@iop.kiev.ua \
--to=dobr@iop.kiev.ua \
--cc=mandrake-russian@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 Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git