From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Michael Shigorin To: mandrake-russian@altlinux.ru Subject: Re: [mdk-re] User remains logged on to pts/0 after exiting X :-( Message-ID: <20010924120628.G7336@lic145.kiev.ua> Mail-Followup-To: mandrake-russian@altlinux.ru References: <20010923231347.A10586@hb.ant-on.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3lcZGd9BuhuYXNfi" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20010923231347.A10586@hb.ant-on.net> User-Agent: Mutt/1.3.22.1i Sender: mandrake-russian-admin@altlinux.ru Errors-To: mandrake-russian-admin@altlinux.ru X-BeenThere: mandrake-russian@altlinux.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: mandrake-russian@altlinux.ru List-Help: List-Post: List-Subscribe: , List-Id: Linux-Mandrake RE / ALT Linux discussion list List-Unsubscribe: , List-Archive: Date: Mon Sep 24 14:40:20 2001 X-Original-Date: Mon, 24 Sep 2001 12:06:28 +0300 Archived-At: List-Archive: List-Post: --3lcZGd9BuhuYXNfi Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Sep 23, 2001 at 11:13:47PM +0400, HB wrote: > Alt-F7, то мы видим пустой черный экран с мигающим на нем курсором (т. е. > это текстовый режим). Такое ощущение, что там еще "что-то осталось", в man deallocvt :) Кстати, в аттаче startx имени меня лениваго, которому лень было выяснять, на какой VT надо сделать новый ("какой?") DISPLAY. Поэтому упомянутый скрипт делает это за меня и мою сестренку. С tmp он относится вроде бережно. На танцы с umask в районе # protect logfile моей паранойи не хватило. -- WBR, Michael Shigorin, webmaster of www.chem.univ.kiev.ua >Home Page: http://visa.chem.univ.kiev.ua/~mike/ ICQ: 113344029 >Brainbench: http://www.brainbench.com/transcript.jsp?pid=2434729 --3lcZGd9BuhuYXNfi Content-Type: text/plain; charset=us-ascii Content-Description: startx, =?koi8-r?B?y8/Uz9LZyiDTwc0g08TF?= =?koi8-r?B?zMHF1CAiIC0tIDpOIiDJINDSycLF0sXUINrBINPPws/K?= Content-Disposition: attachment; filename=startx #!/bin/sh # # (c) 1999 Red Hat Software, Inc. # patched by Michael Shigorin # 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 # 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" --3lcZGd9BuhuYXNfi--