Introduction to GPM
        
        
          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!
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            Development versions of BLFS may not build or run some packages
            properly if LFS or dependencies have been updated since the most
            recent stable versions of the books.
          
         
        
          Package Information
        
        
        
          Additional Downloads
        
        
        
          GPM Dependencies
        
        
          Optional
        
        
          texlive-20250308 (for documentation)
        
       
      
        
          Kernel Configuration
        
        
          Enable the following option in the kernel configuration and
          recompile the kernel if necessary:
        
        Device Drivers --->
  Input device support --->
    -*-   Generic input layer (needed for keyboard, mouse, ...)          [INPUT]
    <*/M>   Mouse interface                                     [INPUT_MOUSEDEV]
       
      
        
          Installation of GPM
        
        
          Install GPM by running the
          following commands:
        
        patch -Np1 -i ../gpm-1.20.7-consolidated-1.patch                &&
patch -Np1 -i ../gpm-1.20.7-gcc15_fixes-1.patch                 &&
./autogen.sh                                                    &&
./configure --prefix=/usr --sysconfdir=/etc ac_cv_path_emacs=no &&
make
        
          If texlive-20250308 is installed, build
          the GPM manual as dvi, ps, and pdf formats:
        
        make -C doc gpm.{dvi,ps} &&
dvipdfm doc/gpm.dvi -o doc/gpm.pdf
        
          This package does not come with a test suite.
        
        
          Now, as the root user:
        
        make install                                          &&
install-info --dir-file=/usr/share/info/dir           \
             /usr/share/info/gpm.info                 &&
rm -fv /usr/lib/libgpm.a                              &&
ln -sfv libgpm.so.2.1.0 /usr/lib/libgpm.so            &&
install -v -m644 conf/gpm-root.conf /etc              &&
install -v -m755 -d /usr/share/doc/gpm-1.20.7/support &&
install -v -m644    doc/support/*                     \
                    /usr/share/doc/gpm-1.20.7/support &&
install -v -m644    doc/{FAQ,HACK_GPM,README*}        \
                    /usr/share/doc/gpm-1.20.7
        
          If texlive-20250308 is installed and
          you've built GPM manual as dvi, ps, and pdf formats, install them
          as the root user:
        
        install -vm644 doc/gpm.{dvi,ps,pdf} /usr/share/doc/gpm-1.20.7
       
      
        
          Command Explanations
        
        
          ./autogen.sh: This
          command creates the missing configure script.
        
        
          ac_cv_path_emacs=no: This
          variable works around an issue causing the package fail to build
          with Emacs-30.2 installed. It also suppresses the
          installations of some “Emacs support files” shipped with GPM. These
          files are quite outdated and they should be superseded with
          Emacs-30.2 built-in GPM support. If you need to
          use Emacs-30.2 in Linux console with mouse support,
          you should install (or reinstall) Emacs-30.2
          after GPM.
        
        
          install-info ...:
          This package installs a .info file,
          but does not update the system dir
          file. This command makes the update.
        
        
          ln -v -sfn libgpm.so.2.1.0
          /usr/lib/libgpm.so: This command is used to create
          (or update) the .so symlink to the
          library.
        
       
      
        
          Configuring GPM
        
        
          
             Systemd Unit
          
          
            To start the gpm
            daemon at boot, install the systemd unit from the blfs-systemd-units-20241211 package by
            running the following command as the root user:
          
          make install-gpm
         
        
          
            Config Files
          
          
            /etc/gpm-root.conf and ~/.gpm-root: The default and individual user
            gpm-root
            configuration files.
          
         
        
          
            Configuration Information
          
          
            GPM is by default started with
            the following parameters: -m
            /dev/input/mice -t imps2. If the mentioned parameters
            don't suit your needs, you can override them by running the
            following commands as the root
            user:
          
          install -v -dm755 /etc/systemd/system/gpm.service.d &&
cat > /etc/systemd/system/gpm.service.d/99-user.conf << EOF
[Service]
ExecStart=/usr/sbin/gpm <list of parameters>
EOF