gim mouse server

Ian Zimmerman


Table of Contents
1. Purpose
2. History

Chapter 1. Purpose

Mice and similar pointing devices are connected to a computer's serial or auxiliary port and interface to it through a low level, highly condensed protocol. This protocol is generally dependent on the device manufacturer. Software authors who want to mouse enable their programs need a higher level protocol in terms of events like mouse button presses, releases, clicks and moves, and a device independent one.

The various X toolkits have long provided this service to graphics mode programs. However, text mode programs are still in use, and many of them (especially those based on the curses full screen library) can be quite naturally driven by mouse input. The gim package aims to serve this need, in the context of text mode programs running on GNU/Linux systems.


Chapter 2. History

In the beginning was selection, written by Andrew Haylett. selection was not a server, it only did one specific thing with text mode mouse events: copy and paste text in the style of xterm. Even this was already quite useful, especially the ability to copy a piece of text from one virtual terminal to another.

The successor of selection was gpm, written by Alessandro Rubini. The major parts of gim design come from gpm: a server talking a relatively high level protocol with clients over local (Unix) sockets, and a client library providing a still higher level procedural programming interface for retrieving events.

gpm became quite successful in that a number of programs gradually provided support for it. The most widely used among them is probably Miguel de Icaza's mc, or Midnight Commander. The ncurses library (the official GNU reimplementation of curses) now integrates gpm events with its wgetch interface. Unfortunately the ncurses interface is much less than a perfect match for gpm, as it is really the least common denominator of gpm and the poorer xterm interface. Therefore the best use of gpm even for curses programs has been to use gpm directly.

However, during the year 2000 two successive maintainers of gpm became very discouraged, and as a result gpm was orphaned. Having been one of the maintainers mentioned above, yours truly had good opportunity and good reason to think about this failure.