[lug] Mad Mice and X Windows

Bonnell, Doug DBonnell at BreeceHill.com
Tue Feb 8 18:16:26 MST 2000

Since this is such a widely seen problem, I'd like to offer my tips
on how to deal with this situation. First, a little background:

	1. Most Linux systems have the concept of a "runlevel".
	    The runlevel tells the system what programs to run
	    after powerup. If X windows is to be on, the runlevel that
	    it is enabled in will call an X "login manager". This is
	    gdm for Gnome (under RedHat), kdm for KDE or xdm.

	2. If you are doing any kind of tinkering with X, find a 
	    runlevel that doesn't startup X. Under RedHat, X is
	    started at runlevel 5, while under SUSE it's runlevel 3.

	    Select runlevel 3 as the default for RedHat or runlevel 2
	    for SUSE. The default runlevel is usually specified in the
	    file /etc/inittab. This will prevent X from starting on it's
	    You will have to tell X to start, and this gives you the power
	    to stop it as you see fit.

OK, so much for preventing being stuck forever in X windows with a
mad mouse. But, how do you handle the situation where you messed
up the mouse configuration or the mouse just died?

You will need to bootup a rescue diskette (you did make one, didn't you?).
Once up, mount your harddrive's root partition ( usually /dev/hda1 ) at
some available place such as /mnt. Somehow, edit the inittab on your
harddrive so the default runlevel will not start X, then reboot the system
(using the harddrive, of course). This should restore your system to a sane
(without X) state.

Lastly, you need to either use the X setup/configuration tools for your
distribution to fix your mouse settings under X or manually edit the file
"XF86Config". Distributions like to move this file around. It's under
on RedHat and /etc for SUSE. There is a section pertaining to the pointer
device and this is likely what was changed that caused the mouse to go

You can test different settings in XF86Config by starting X ( with xstart ).
If the X server can't come up, you will return to your shell and see the
messages. If the mouse is mad, you can exit X with Ctrl-Alt-BackSpace
and you will return to your shell.

I hope this all wasn't too boring for those of you who already know about
all of this.

Doug Bonnell
Software Engineer
BreeceHill Technologies Inc. 

More information about the LUG mailing list