Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220 - gpm config file enhancement.
Summary: gpm config file enhancement.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-18 06:23 UTC by Maciek
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.