Linux HOWTOs

About | Home | Search


HOWTO: gpm
Description: General purpose mouse (daemon)
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# gpm 1.20.1
# ============
# Slackware 8.1, 9.0, 9.1, 10.0, 10.1, and 10.2's 'gpm' packages all include
# gpm version 1.19.6

# If you have trouble downloading it from the URL below, try here

# Note: if you don't have texinfo installed, you may have to
# run 'make -i install' (-i = ignore errors and keep going)

cd
test -f installed/gpm-1.20.1.tar.bz2 && mv installed/gpm-1.20.1.tar.bz2 .
test ! -f gpm-1.20.1.tar.bz2 &&
 wget ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2

# Verify tarball w/ md5sum:
# (this came from my sha1sum-verified tarball)
echo "2c63e827d755527950d9d13fe3d87692  gpm-1.20.1.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
echo "c48d937e62abb438c2f6439b34ef3332c89af8d1  gpm-1.20.1.tar.bz2" | \
 sha1sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "gpm-*" -exec rm -r {} \;
tar xjvf ~/gpm-1.20.1.tar.bz2
cd gpm-1.20.1
test $UID = 0 && chown -R root:root .

# Patch it to quiet errors like "debug [lib/liblow.c(204)]" that show up in
# apps that are linked to libgpm (mc, dialog, etc.):
wget -nc http://englanders.cc/pub/linux/patches/notmine/\
gpm-1.20.1-silent.patch &&
 patch -p1 < gpm-1.20.1-silent.patch

./configure --prefix=/usr --with-curses --sysconfdir=/etc
make

# Become root to install it
su

removepkg gpm
rm -f /lib/libgpm.* /usr/lib/libgpm.*
make install
ldconfig

# If you don't have a /etc/rc.d/rc.gpm, either use this one:
cd /etc/rc.d
test -f rc.gpm &&
 ( mv -f rc.gpm rc.gpm.old ; chmod 600 rc.gpm.old )
wget http://englanders.cc/pub/linux/misc/rc.gpm && chmod 700 rc.gpm

## or run this to find out what mouse type to use (/dev/mousedev = your
## actual mouse device - /dev/input/mice, /dev/mouse, etc.):
# gpm -m /dev/mousedev -t help | less
## and then add something to /etc/rc.d/rc.local to start gpm on boot-up:
# if [ -x /usr/sbin/gpm ]; then
#   echo "Starting gpm..."
#   /usr/sbin/gpm -m /dev/psaux -t imps2
# fi

# Remove lines from the Slackware 'elflibs' package file that reference files
# from the old gpm that you removed above.
FNAME=`find /var/adm/packages/*elflibs* -type f 2> /dev/null | head -1`
test -n "$FNAME" &&
 cat $FNAME | egrep -v "^lib/libgpm\.so\." > ${FNAME}.new
 test -s ${FNAME}.new &&
 (
  mkdir -p -m 0700 ~/backup/packages
  mv -f $FNAME ${FNAME}.`date +%Y%m%d`
  mv ${FNAME}.`date +%Y%m%d` ~/backup/packages/
  mv -f ${FNAME}.new $FNAME
 )
unset FNAME

# (Re-)start gpm:
test -f /var/run/gpm.pid && /etc/rc.d/rc.gpm stop
/etc/rc.d/rc.gpm start

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/gpm-*.tar.*
mv gpm-1.20.1.tar.bz2 installed/

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>