Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 220

Summary: gpm config file enhancement.
Product: Gentoo Linux Reporter: Maciek <MacBerry>
Component: [OLD] Core systemAssignee: Martin Schlemmer (RETIRED) <azarah>
Status: RESOLVED FIXED    
Severity: enhancement CC: woodchip
Priority: High    
Version: 1.0 RC6 r14   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Maciek 2002-01-18 06:23:04 UTC
Hello,
The config file for gpm doesn't let you set other options that just
MOUSE and MOUSEDEV. As more and more people use some other, advanced
options (f.e. they set a /dev/gpmdata repeater to use it with X),
I propose to modify 2 files:

******************************
/etc/init.d/gpm :

#!/sbin/runscript

#NB:  Config options moved to /etc/conf.d/gpm


depend() {
        need localmount
}

checkconfig() {
        if [ -z "$MOUSEDEV" ] || [ -z "$MOUSE" ] ; then
                eerror "You need to setup at least MOUSEDEV and MOUSE in 
/etc/conf.d/gpm first"
                return 1
        fi
}

start() {
        checkconfig || return 1

        #cheerfully stolen from debian :+)
        if [ -n "$MOUSEDEV" ];       then parameters=" -m $MOUSEDEV"; fi
        if [ -n "$MOUSE" ];          then parameters="$parameters -t $MOUSE"; 
fi
        if [ -n "$RESPONSIVENESS" ]; then parameters="$parameters -r 
$RESPONSIVENESS"; fi
        if [ -n "$REPEAT_TYPE" ];    then parameters="$parameters 
-R$REPEAT_TYPE"; fi
        if [ -n "$APPEND" ];         then parameters="$parameters $APPEND "; fi
        # There is no space after -R!

        ebegin "Starting gpm"
        start-stop-daemon --start --quiet --exec /usr/sbin/gpm \
                -- $parameters
        eend ${?}
}

stop() {
        ebegin "Stopping gpm"
        start-stop-daemon --stop --quiet --pidfile /var/run/gpm.pid
        eend ${?}
}
******************************
and thus /etc/conf.d/gpm could be:

******************************
# Config file for /etc/init.d/gpm

# The type of mouse you have and the device it is connected to

MOUSEDEV=/dev/misc/psaux
RESPONSIVENESS=
REPEAT_TYPE=raw
MOUSE=imps2
APPEND="-g 1 -A 60"


******************************
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-01-20 04:00:12 UTC
Updated on CVS.  Just remerge gpm and update the stuff in /etc.