This chapter contains mainly hardware utilities. It also contains some applications used by other applications in the book for installation purposes.
The GPM (General Purpose Mouse daemon) package contains a mouse server for the console and xterm. It not only provides cut and paste support generally, but its library component is used by various software such as Links to provide mouse support to the application. It is useful on desktops, especially if following (Beyond) Linux From Scratch instructions; it's often much easier (and less error prone) to cut and paste between two console windows than to type everything by hand!
Download (FTP): ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2
Download size: 556 KB
Estimated Disk space required: 5.3 MB
Estimated build time: 0.09 SBU
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.1/gpm-1.20.1-segfault.patch
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.1/gpm-1.20.1-silent.patch
Install GPM by running the following commands:
patch -Np1 -i ../gpm-1.20.1-segfault.patch &&
patch -Np1 -i ../gpm-1.20.1-silent.patch &&
LDFLAGS="-lm" ./configure --prefix=/usr --sysconfdir=/etc &&
make &&
make install &&
cp conf/gpm-root.conf /etc &&
ldconfig -n -l /usr/lib/libgpm.so.1.19.0
LDFLAGS="-lm": The math library must be linked with gpm, as ceil() is used in some cursor scrolling logic.
ldconfig -n -l : During installation, gpm outputs a message to run the above command to create the proper library links.
Install the /etc/rc.d/init.d/gpm init script included in the blfs-bootscripts-5.1 package.
make install-gpm
/etc/sysconfig/mouse This file contains the name of your mouse device and the protocol which it uses. To create this file, run the following:
cat > /etc/sysconfig/mouse << "EOF" # Begin /etc/sysconfig/mouse MDEVICE=[yourdevice] PROTOCOL=[yourprotocol] # End /etc/sysconfig/mouse EOF
Examples of values to set MDEVICE and PROTOCOL to are:
MDEVICE=/dev/psaux PROTOCOL=imps2
A list of which protocol values are known can be found by running gpm -t -help. Your MDEVICE setting depends on which type of mouse you have. For example, /dev/ttyS0 for a serial mouse (on Windows this is COM1), /dev/input/mice is often used for USB mice and /dev/psaux for PS2 mice.
The GPM package contains gpm, gpm-root, disable-paste and mev.