TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:1567] X dies with Ctrl-Alt-F2




Christopher Reid Palmer wrote:
> 
> On Fri, 2 Oct 1998, Scot Jenkins wrote:
> 
> > don't run gpm when you boot up.  when you switch to text mode, gpm has
> > control of the mouse. if you're using the mouse (even if you bump it)
> > when switching back to X, X will die.
> 
> Yeah, this is most likely the problem; I've heard of it before. Thing is,
> which is weird, some people have trouble with it and some don't -- I used
> to run both X and gpm with no problems on the same hardware. The world may
> never know...

I use GPM under RH5.1 (with RH errata patches applied, see below) and have
found that:
	cntl-alt-F1 gives me tty1
	cntl-alt-f2 gives me tty2,
	cntl-alt-f3 gives me tty3,
	cntl-alt-f4 gives me tty4,
	cntl-alt-f5 gives me tty5,
	cntl-alt-f6 gives me tty6,
	cntl-alt-f7  gets me the X session :1.0
	cntl-alt-f8  gets me the X session :2.0
	cntl-alt-f9  gets me the X session :3.0
	cntl-alt-f10 gets me the X session :4.0
	cntl-alt-f11 gets me the X session :5.0
	cntl-alt-f12 gets me the X session :6.0.

As I write, I'm logged into tty{1,2,3,4,5,6} and have fired up X on all of
:{1,2,3,4,5,5}, and can switch back and forth at will.  The mouse sometimes
takes a second or two to "catch up" and start working when I switch between
ttys and X sessions, but other than that, everything seems to work.  Note
that "ps" shows gpm running continously with the same pid, regardless of
what's on the screen, so X isn't doing any tricks killing off/restarting
gpm.  What's disconcerting?  Switching X sessions and finding the screen
saver (on a 5 minute delay) running when I get there (this is correct
functionality, but not really expected).

XFree86 & gpm versions as follows:
	SOS:sos=> rpm -qa | grep XFree
	XFree86-fonts-3.1.2-11
	XFree86-Xvfb-3.3.2-13
	XFree86-Xnest-3.3.2-13
	XFree86-S3-3.3.2-13
	XFree86-100dpi-fonts-3.3.2-13
	XFree86-VGA16-3.3.2-13
	XFree86-SVGA-3.3.2-13
	XFree86-libs-3.3.2-13
	XFree86-75dpi-fonts-3.3.2-13
	XFree86-3.3.2-13
	XFree86-devel-3.3.2-13
	SOS:sos=> rpm -q gpm
	gpm-1.13-6
	SOS:sos=> 

My "start-X11" script is hand written in ksh and reads:
	#!/bin/ksh
	
	msg ()
	{ msg_ts=`date +"%H:%M:%S"`
  	echo "$msg_ts Xgo: $*"
  	echo "$msg_ts Xgo: $*" >> $HOME/.Xerrors
	}
	
	if [ "X$HOME" = "X" ]
	then echo "Environment variable \"HOME\" not defined."
	     echo "Can not continue with X11 initialization."
	     exit 1
	fi
	
	if [ -f $HOME/.Xerrors ]
	then mv $HOME/.Xerrors $HOME/.Xerrors.old
	fi
	touch $HOME/.Xerrors
	
	if [ "X$DISPLAY" = "X" ]
	then export DISPLAY=":`who am i | awk '{ print \$2 }' | cut -c 4-`.0"
	     msg "Setting DISPLAY=$DISPLAY"
	else msg "Using DISPLAY=$DISPLAY"
	fi
	
	msg "Starting X11..."
	xinit $HOME/.xinitrc $1 -- /usr/X11R6/bin/X $DISPLAY >> $HOME/.Xerrors 2>&1 
	msg "Any errors encountered appear in $HOME/.Xerrors"

The important part above being 1) how $DISPLAY is set, and 2) how xinit is fired
off.  Note that this script doesn't create a .Xerrors file that's sensitive to
which X session is used, but it probably ought to (hey, I don't use more than
1 X session very often and I'm lazy).

Hope this helps,idly,

============================================================================
     /|   | Linus's Law:                      |
  \'o.O'  |  Given enough eyeballs, all bugs  |  Steve Siegfried
  =(___)= |  are shallow.  Thus, debugging    |  sos@skypoint.com
     U    |  is parallelizable.               |
============================================================================