Mouse setup to run 2.4 kernel alongside 2.6?

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Sat Sep 11 13:55:29 UTC 2004


Am Sa, den 11.09.2004 schrieb Andrew Konosky um 4:48:

> I would like to install a 2.4 kernel and add it to my grub.conf so that 
> I can either use 2.4 or 2.6, depeding on what programs I need to run. 
> Since they use different mouse settings, how would I go about setting 
> something up so that I don't have to edit the xorg config every time I 
> switch?

Which applications do require a 2.4 kernel?

> I have a regular PS/2 mouse, so could I just create some symlinks to the 
> mouse device? If so, link what to what?

You could test following:

Edit /etc/rc.sysinit and add at it's end, right before the last lines
for exit signals to rhgb, code like this:

rm -f /dev/mouse
if [ $(uname -r | cut -b -3) == "2.4" ]; then
    ln -sf /dev/psaux /dev/mouse
else
    ln -sf /dev/input/mice /dev/mouse
fi

Use in /etc/X11/xorg.conf as mouse device location /dev/mouse.
If you run service gpm you'll have to care for that too. Copy
/etc/sysconfig/gpm (with current settings for kernel 2.6) to
/etc/sysconfig/gpm-2.6. Copy it to to /etc/sysconfig/gpm-2.4 and change
the DEVICE line to DEVICE="/dev/mouse". At top of /etc/init.d/gpm you'll
have to change the sourcing of the gpm sysconfig file.

[ -e /etc/sysconfig/gpm ] && . /etc/sysconfig/gpm

becomes

rm -f /etc/sysconfig/gpm
if [ $(uname -r | cut -b -3) == "2.4" ]; then
    [ -e /etc/sysconfig/gpm-2.4 ] && cp -a /etc/sysconfig/gpm-2.4
/etc/sysconfig/gpm
else [ -e /etc/sysconfig/gpm-2.6 ] && cp -a /etc/sysconfig/gpm-2.6
/etc/sysconfig/gpm
fi
[ -e /etc/sysconfig/gpm ] && . /etc/sysconfig/gpm

Do the same with the /etc/sysconfig/mouse config file according line
DEVICE=... This sysconfig file is source right below the gpm sysconfig
file in the gpm init script.

This all is untested and *might* work! I give not any warranty! Keep
care for mistypings.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 2 (Tettnang) kernel 2.6.8-1.521smp 
Serendipity 15:34:12 up 12 days, 12:50, load average: 0.45, 0.48, 0.54 





More information about the users mailing list