home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / MGR-HOWTO < prev    next >
Text File  |  1998-10-14  |  26KB  |  737 lines

  1.   The MGR Window System HOWTO
  2.   Vincent Broman
  3.   Draft, 30 May 1996
  4.  
  5.   1.  This HOWTO
  6.  
  7.                       Copyright Vincent Broman 1995.
  8.          Permission granted to make and distribute copies of this HOWTO
  9.             under the conditions of the GNU General Public License.
  10.  
  11.   1.1.  Archiving
  12.  
  13.   This HOWTO is archived in ftp://archimedes.nosc.mil/pub/Mgr/MGR-
  14.   HOWTO.sgml, and also distributed from
  15.   ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/MGR-HOWTO.  In nearby
  16.   directories the same document may appear in alternate formats like
  17.   MGR-HOWTO.txt.
  18.  
  19.   1.2.  Authentication
  20.  
  21.   Copies of the MGR distribution due to Broman should be accompanied by
  22.   PGP signature files, signed by "Vincent Broman <broman@nosc.mil>".
  23.  
  24.   1.3.  Credit for the HOWTO
  25.  
  26.   While Vincent Broman first put together this HOWTO, much of the
  27.   information and text was obtained from FAQs, READMEs, etc. written by
  28.   Stephen Uhler, Michael Haardt, and other public-spirited net-persons.
  29.   Email corrections and suggested changes to broman@nosc.mil.
  30.  
  31.   Uhler was the main architect of MGR -- see the Credit section below.
  32.  
  33.   2.  What is the MGR window system?
  34.  
  35.   2.1.  Function
  36.  
  37.   MGR (ManaGeR) is a graphical window system.  The MGR server provides a
  38.   builtin window manager and windowed graphics terminal emulation on
  39.   color and monochrome bitmap displays.  MGR is controlled by mousing
  40.   pop-up menus, by keyboard interaction, and by escape sequences written
  41.   on pseudo-terminals by client software.
  42.  
  43.   MGR provides each client window with: termcap-style terminal control
  44.   functions, graphics primitives such as line and circle drawing;
  45.   facilities for manipulating bitmaps, fonts, icons, and pop-up menus;
  46.   commands to reshape and position windows; and a message passing
  47.   facility enabling client programs to rendezvous and exchange messages.
  48.   Client programs may ask to be informed when a change in the window
  49.   system occurs, such as a reshaped window, a pushed mouse button, or a
  50.   message sent from another client program.  These changes are called
  51.   events.  MGR notifies a client program of an event by sending it an
  52.   ASCII character string in a format specified by the client program.
  53.   Existing applications can be integrated into the windowing environment
  54.   without modification by having MGR imitate keystrokes in response to
  55.   user defined menu selections or other events.
  56.  
  57.   2.2.  Requirements
  58.  
  59.   MGR currently runs on Linux, FreeBSD, Sun 3/4 workstations with SunOS,
  60.   and Coherent.  Various older versions of MGR run on the Macintosh,
  61.   Atari ST MiNT, Xenix, 386-Minix, DEC 3100, and the 3b1 Unix-pc.  Many
  62.   small, industrial, real-time systems under OS9 or Lynx in Europe use
  63.   (another variant of) Mgr for their user interface.  The programming
  64.   interface is implemented in C and in ELisp, although supporting
  65.   clients written in other languages is quite easy.
  66.  
  67.   Running MGR requires much less in resources than X, or even gcc.  It
  68.   does not have the user-base, software repertory, or high-level
  69.   libraries of X or MS-Windows, say, but it is quite elegant and
  70.   approachable.
  71.  
  72.   It has been said that MGR is to X as Unix was to Multics.
  73.  
  74.   2.3.  How do MGR, X11, and 8.5 compare?
  75.  
  76.   MGR consists of a server with builtin window manager and terminal
  77.   emulator, and clients which run in this terminal emulator and use it
  78.   to communicate with the server.  No resource multiplexing is done.
  79.  
  80.   X11 consists of a server and clients, which usually connect to the
  81.   server using a socket.  All user visible things like terminal
  82.   emulators, window managers etc are done using clients.  No resource
  83.   multiplexing is done.
  84.  
  85.   8.5, the Plan 9 window system, is a resource multiplexer, as each
  86.   process running in a window can access /dev/bitblt, /dev/mouse and
  87.   /dev/kbd in its own namespace.  These are multiplexed to the
  88.   /dev/bitblit, /dev/mouse and /dev/kbd in the namespace of 8.5.  This
  89.   approach allows one to run 8.5 in an 8.5 window, a very clean design.
  90.   8.5 further has an integrated window manager and terminal emulator.
  91.  
  92.   3.  Installing MGR
  93.  
  94.   The latest source distribution can be FTPed from the directory
  95.   ftp://archimedes.nosc.mil/pub/Mgr/69 or Mosaiced from
  96.   http://archimedes.nosc.mil/Mgr/69.  The same should be found at
  97.   ftp://sunsite.unc.edu/pub/Linux/apps/MGR and its mirrors.  Older
  98.   versions of this distribution from Haardt can be found on
  99.   tsx-11.mit.edu and perhaps elsewhere.  Pre-Linux versions of MGR from
  100.   Uhler and others have been found at ftp://bellcore.com/pub/mgr, but I
  101.   think they are gone now.  I have saved a copy of everything about MGR
  102.   seen on the Internet, but I am not aware of anything weighty that is
  103.   missing from this Linux/Sun distribution.  MGR has been through a lot
  104.   of versions and releases, but the current *Linux* version number is
  105.   0.69.  This version number could jump to 1.0 when stable 256-color VGA
  106.   code for Linux appears (for more than one video card type).  RCS
  107.   version numbers have increased from Bellcore's 4.3 up to our 4.13 now.
  108.  
  109.   Required tools to build this distribution of MGR are m4 (GNU, or
  110.   perhaps another supporting the -D option), make (GNU, or perhaps
  111.   another supporting include) and *roff for the docs.  Also sh, awk, and
  112.   POSIX install.  Binary distributions are not assembled often so you
  113.   need an ANSI C compiler environment, e.g. gcc.
  114.  
  115.   A Linux installation requires Linux 0.99.10 or better (1.2.13 is what
  116.   I actually test on now), an HGC, EGA, VGA, or SVGA graphics card, and
  117.   a mouse.  Mouses supported are: serial Microsoft mouse, serial
  118.   MouseSystems 3 and 5 byte mouse, serial MMSeries mouse, serial
  119.   Logitech mouse, PS/2 mouse, or a bus mouse.  With Buckey (Meta) hot
  120.   keys enabled, even a mouseless system could do a certain amount of
  121.   useful work under MGR.  The VGA 640x480 monochrome graphics mode is
  122.   supported out of the box, as is 640x350 and 640x200.  To run 800x600,
  123.   or other modes that your BIOS can initialize and which do not require
  124.   bank-switching, you need to run a small program (supplied as
  125.   src/vgamisc/regs.exe) under DOS or an emulator to read the VGA
  126.   registers and write a header file which you place in the directory
  127.   src/libbitblit/linux, so that it can be #include'd by the vga.c file
  128.   there.  Samples of these files are supplied, but please create your
  129.   own.  Some VGA cards can use 128k windows, and these might run higher
  130.   monochrome resolutions.
  131.  
  132.   The Linux-colorport code also runs in the standard 320x200x256 color
  133.   VGA mode without difficulty, because no bank switching is required.
  134.   If you think of how few 64000 pixels is, you would realize this color
  135.   mode is quite limited.  Non-fast, but simple, bank-switching code has
  136.   been added in version 0.65, and it works with a Tseng ET4000 card in
  137.   640x480x256 and 800x600x256 modes.  The S3 code does not work in super
  138.   VGA resolutions, yet.  Supporting new super VGA cards requires writing
  139.   one function to switch banks and then making sure that the desired
  140.   screen mode can be initialized from a register dump, possibly with
  141.   hand-tweaking.  The Linux color servers generally mangle the screen
  142.   fonts, necessitating use of restorefont as in runx.  If someone were
  143.   to extract the VGA initialization code out of X, this might make MGR
  144.   work on a lot more color systems.
  145.  
  146.   Suns with SunOS 4.1.2+ and bwtwo, cgthree, or cgsix frame buffers are
  147.   supported.  Their speed handling color is good.  Coherent
  148.   installations should refer to the Versions/README.Coh file in the
  149.   source distribution.  Porting the latest-and-greatest MGR to another
  150.   POSIX-like system which provides select() and pty's and direct access
  151.   to a bitmapped frame-buffer ought to be straightforward, just
  152.   implementing the libbitblit library based on the sunmono or colorport
  153.   code, say.
  154.  
  155.   If you want to install everything, you need 7 MB disk space for
  156.   binaries, fonts, manual pages etc.  The sources are about 4.5 MB, plus
  157.   object files during compilation.
  158.  
  159.   Normally, /usr/mgr should be either the directory or a link to the
  160.   directory where you install MGR stuff for runtime use.  Typing
  161.  
  162.        cd /usr/mgr; tar xvfz whereveryouputit/mgrusr-0.69.tgz
  163.  
  164.   and optionally
  165.  
  166.        cd /usr/mgr; tar xvfz wherever/morefonts-0.69.tgz
  167.  
  168.   will unpack these.  The source can be put anywhere, e.g. typing
  169.  
  170.        cd /usr/src/local/mgr; tar xvfz wherever/mgrsrc-0.69.tgz
  171.  
  172.   to unpack the sources from archimedes.nosc.mil.
  173.  
  174.   The source tree can be compiled from one top-level Makefile which
  175.   invokes lower-level Makefiles, all of which "include" a "Configfile"
  176.   at the top level.  The Configfile is created by an interactive sh
  177.   script named Configure, which asks you questions, then runs m4 on a
  178.   Configfile.m4.  So you type something like this:
  179.        chdir /usr/src/local/mgr
  180.        sh ./Configure
  181.        make first
  182.        make depend
  183.        make install
  184.        make clean
  185.  
  186.   It might be wise, before running make, to eyeball the Configfile
  187.   generated by the Configure script, checking that it looks reasonable.
  188.   (At least one m4 poops out (Sun /usr/bin/m4), creating a very short
  189.   Configfile.  If this happens, try hand editing a copy of
  190.   Configfile.sun or Configfile.lx) One can also make all in any
  191.   directory with a Makefile as soon as the libraries have been compiled
  192.   and installed.  The server, libraries, and some clients have been
  193.   linted, but several clients are K&R C code that generates many
  194.   compiler warnings.
  195.  
  196.   Several flags in MGRFLAGS can be added/omitted in the Configfile to
  197.   change some optional features in the server, viz:
  198.  
  199.      -DWHO
  200.         muck utmp file so "who" works
  201.  
  202.      -DVI
  203.         code for clicking the mouse in vi moving the cursor
  204.  
  205.      -DDEBUG
  206.         enable debugging output selectable with -d options.
  207.  
  208.      -DFASTMOUSE
  209.         XOR the mouse track
  210.  
  211.      -DBUCKEY
  212.         for hot-key server commands without mousing
  213.  
  214.      -DPRIORITY
  215.         for priority window scheduling instead of round-robin; the
  216.         active window gets higher priority
  217.  
  218.      -DCUT
  219.         for cut/paste between windows and a global snarf buffer
  220.  
  221.      -DMGR_ALIGN
  222.         forces window alignment for fast scrolling (monochrome)
  223.  
  224.      -DKILL
  225.         kills windows upon tty i/o errors
  226.  
  227.      -DSHRINK
  228.         use only some of the screen ($MGRSIZE in environment)
  229.  
  230.      -DNOSTACK
  231.         don't permit event stacking
  232.  
  233.      -DBELL
  234.         audibly ring the bell
  235.  
  236.      -DKBD
  237.         read mgr input from the sun kbd, instead of stdin.  This permits
  238.         redirection of console msgs to a window.
  239.  
  240.      -DFRACCHAR
  241.         fractional character movement for proportional fonts
  242.      -DXMENU
  243.         extended menu stuff (experimental)
  244.  
  245.      -DMOVIE
  246.         movie making extension which logs all operations to a file for
  247.         later replay -- not quite working under Linux
  248.  
  249.      -DEMUMIDMSBUT
  250.         Emulate a missing middle mouse button by chording
  251.  
  252.   Not all combinations of these options have been tested on all systems.
  253.  
  254.   The BITBLITFLAGS macro should contain -DBANKED if you're trying out
  255.   the super VGA color.
  256.  
  257.   C code for the static variables in the server containing icons and
  258.   fonts is generated by a translator from icon and font files.
  259.  
  260.   Not all the clients are compiled and installed by the Makefiles.
  261.   Clients found under src/clients having capitalized names or not
  262.   compiled by the supplied Makefiles may have problems compiling and/or
  263.   running, but they may be interesting to hack on.  Most of the screen
  264.   drivers found under the libbitblit directory are of mainly
  265.   archeological interest. Grave robbing can be profitable.
  266.  
  267.   At some point check that your /etc/termcap and/or terminfo file
  268.   contain entries for MGR terminals such as found in the misc directory.
  269.   If all your software checks $TERMCAP in the environment, this is not
  270.   needed, as long as you run eval `set_termcap` in each window.
  271.  
  272.   MGR works better if run setuid root, because it wants to chown ptys
  273.   and write in the utmp file.  This helps the ify iconifier client work
  274.   better and the event passing mechanism be more secure.  On Linux, root
  275.   permissions are required in order to do in/out on the screen device.
  276.   Otherwise, you decide whether to trust it.
  277.  
  278.   In versions around 0.62 there are troubles on the Sun with using the
  279.   csh as the default shell.  Programs seem to run in a different process
  280.   group than the foreground process group of the window's pty, in
  281.   contradiction to man pages and posix specs.  There is no trouble with
  282.   bash, sh, or rc.  Ideas why?
  283.  
  284.   4.  Running MGR
  285.  
  286.   The only file required in an MGR installation is the server itself.
  287.   That would give you terminal emulator windows with shells running in
  288.   them and cutting and pasting with the mouse, but no nice clocks, extra
  289.   fonts, fancy graphics, etc.  Depending on options, a monochrome server
  290.   needs about 200K of RAM plus dynamic space for windows, bitmaps, etc.
  291.  
  292.   If /usr/mgr/bin is in your PATH, then just type "mgr" to start up.
  293.   After enjoying the animated startup screen, press any key.  When the
  294.   hatched background and mouse pointer appear, hold down the left mouse
  295.   button, highlight the "new window" menu item, and release the button.
  296.   Then drag the mouse from corner to corner where you want a window to
  297.   appear.  The window will have your default shell running in it.  Hold
  298.   down the left mouse button over an existing window to see another menu
  299.   for doing things to that window.  Left-clicking on an obscured window
  300.   raises it to the top.  The menu you saw that pops-up over the empty
  301.   background includes the quit command.  For people with a two button
  302.   mouse: press both buttons together to emulate the missing middle
  303.   button used by some clients.
  304.  
  305.   The quit submenu includes the "really quit" option, a suspend option
  306.   which should only be used if you run a job-control shell, and a screen
  307.   saver and locker option, which waits for you to type your login
  308.   password when you come back to your machine.
  309.  
  310.   When trying to run MGR, if you get:
  311.  
  312.      can't find the screen
  313.         make sure you have a /dev entry for your display device, e.g. on
  314.         a Sun /dev/bwtwo0.  If not, as root cd to /dev, and type
  315.         "MAKEDEV bwtwo0".  Otherwise, you might need the -S/dev/bwtwo0
  316.         or (on Linux) the -S640x480 command line option when starting
  317.         mgr.  On Linux, you might also make sure that /usr/mgr/bin/mgr
  318.         was installed setuid root.
  319.  
  320.      can't find the mouse
  321.         make sure /dev/mouse exists, usually as a symbolic link to the
  322.         real device name for your mouse.  If you haven't permission to
  323.         write in /dev, then something like a -m/dev/cua0 option can be
  324.         given when starting mgr.  Also, make sure you've supplied the
  325.         right mouse protocol choice when you configured mgr.  The mouse
  326.         may speak Microsoft, even if that is not the brand name.
  327.  
  328.      can't get a pty
  329.         make sure all of /dev/[tp]ty[pq]?  are owned by root, mode 666,
  330.         and all programs referenced with the "shell" option in your
  331.         .mgrc startup file (if any) exist and are executable.
  332.  
  333.      none but the default font
  334.         make sure MGR is looking in the right place for its fonts.
  335.         Check the Configfile in the source or see whether a
  336.         -f/usr/mgr/font option to mgr fixes the problem.
  337.  
  338.      completely hung (not even the mouse track moves)
  339.         login to your machine from another terminal (or rlogin) and kill
  340.         the mgr process.  A buckey-Q key can quit MGR if the keyboard
  341.         still works.
  342.  
  343.   4.1.  Applications not aware of MGR
  344.  
  345.   Any tty-oriented application can be run in an MGR window without
  346.   further ado.  Screen-oriented applications using termcap or curses can
  347.   get the correct number of lines and columns in the window by your
  348.   using shape(1) to reshape the window or using set_termcap(1) to obtain
  349.   the correct termcap entry.
  350.  
  351.   4.2.  MGR Applications (clients) distributed with the server
  352.  
  353.      bdftomgr
  354.         converts some BDF fonts to MGR fonts
  355.  
  356.      browse
  357.         an icon browser
  358.  
  359.      bury
  360.         bury this window
  361.  
  362.      c_menu
  363.         vi menus from C compiler errors
  364.  
  365.      clock
  366.         digital display of time of day
  367.  
  368.      clock2
  369.         analog display of time of day
  370.  
  371.      close
  372.         close this window, iconify
  373.  
  374.      color
  375.         set the foreground and background color for text in this window
  376.  
  377.      colormap
  378.         read or write in the color lookup table
  379.  
  380.      cursor
  381.         change appearance of the character cursor
  382.  
  383.      cut
  384.         cut text from this window into the cut buffer
  385.  
  386.      cycle
  387.         display a sequence of icons
  388.  
  389.      dmgr
  390.         crude ditroff previewer
  391.  
  392.      fade
  393.         fade a home movie script from one scene to another
  394.  
  395.      font
  396.         change to a new font in this window
  397.  
  398.      gropbm
  399.         a groff to PBM driver using Hershey fonts
  400.  
  401.      hpmgr
  402.         hp 2621 terminal emulator
  403.  
  404.      ico
  405.         animate an icosahedron or other polyhedron
  406.  
  407.      iconmail
  408.         notification of mail arrival
  409.  
  410.      iconmsgs
  411.         message arrival notification
  412.  
  413.      ify
  414.         iconify and deiconify windows
  415.  
  416.      loadfont
  417.         load a font from the file system
  418.  
  419.      maze
  420.         a maze game
  421.  
  422.      mclock
  423.         micky mouse clock
  424.  
  425.      menu
  426.         create or select a pop-up menu
  427.  
  428.      mgr
  429.         bellcore window system server and window manager
  430.  
  431.      mgrbd
  432.         boulder-dash game
  433.  
  434.      mgrbiff
  435.         watch mailbox for mail and notify
  436.  
  437.      mgrload
  438.         graph of system load average
  439.  
  440.      mgrlock
  441.         lock the console
  442.  
  443.      mgrlogin
  444.         graphical login controller
  445.  
  446.      mgrmag
  447.         magnify a part of the screen, optionally dump to file
  448.  
  449.      mgrmail
  450.         notification of mail arrival
  451.  
  452.      mgrmode
  453.         set or clear window modes
  454.  
  455.      mgrmsgs
  456.         message arrival notification
  457.  
  458.      mgrplot
  459.         Unix "plot" graphics filter
  460.  
  461.      mgrsclock
  462.         sandclock
  463.  
  464.      mgrshowfont
  465.         browse through mgr fonts
  466.  
  467.      mgrsketch
  468.         a sketching/drawing program
  469.  
  470.      mgrview
  471.         view mgr bitmap images
  472.  
  473.      mless
  474.         start up less/more in separate window, menu added for less
  475.  
  476.      mnew
  477.         startup up any program in a separate, independent window
  478.  
  479.      mphoon
  480.         display the current phase of the moon
  481.  
  482.      mvi
  483.         start up vi in a separate window, with mouse pointing
  484.  
  485.      oclose
  486.         (old) close a window
  487.  
  488.      omgrmail
  489.         (old) notification of mail arrival
  490.  
  491.      pbmrawtomgr, pgmrawtomgr, ppmrawtomgr
  492.         convert raw PBM/PGM/PPM image files to mgr bitmap format
  493.  
  494.      pbmstream
  495.         split out a stream of bitmaps
  496.  
  497.      pbmtoprt
  498.         printer output from PBM
  499.  
  500.      pgs
  501.         ghostscript patch and front end, a PS viewer
  502.  
  503.      pilot
  504.         a bitmap browser, or image viewer
  505.  
  506.      resetwin
  507.         cleanup window state after client crashes messily
  508.  
  509.      rotate
  510.         rotate a bitmap 90 degrees.
  511.  
  512.      screendump
  513.         write graphics screen dump to a bitmap file
  514.  
  515.      set_console
  516.         redirect console messages to this window
  517.  
  518.      set_termcap
  519.         output an appropriate TERM and TERMCAP setting
  520.  
  521.      setname
  522.         name a window, for messages and iconifying
  523.  
  524.      shape
  525.         reshape this window
  526.  
  527.      square
  528.         square this window
  529.  
  530.      squeeze
  531.         compress mgr bitmap using run-length encoding
  532.  
  533.      startup
  534.         produce a skeleton startup file for current window layout
  535.  
  536.      texmgr
  537.         TeX dvi file previewer
  538.  
  539.      text2font, font2text
  540.         convert between mgr font format and text dump
  541.  
  542.      unsqueeze
  543.         uncompress mgr bitmap using run length encoding
  544.  
  545.      vgafont2mgr, mgrfont2vga
  546.         convert between mgr font format and VGA
  547.  
  548.      window_print
  549.         print an image of a window
  550.  
  551.      zoom
  552.         an icon editor
  553.  
  554.      bounce, grav, grid, hilbert, mgreyes, stringart, walk
  555.         graphics demos
  556.  
  557.   4.3.  MGR-aware clients distributed separately, see "SUPPORT" file
  558.  
  559.      calctool
  560.         on-screen calculator
  561.      chess
  562.         frontend to /usr/games/chess
  563.  
  564.      gnu emacs
  565.         editor with lisp/term/mgr.el mouse & menu support
  566.  
  567.      gnuplot
  568.         universal scientific data plotting
  569.  
  570.      metafont
  571.         font design and creation
  572.  
  573.      origami
  574.         folding editor
  575.  
  576.      pbmplus
  577.         portable bitmap format conversions, manipulations
  578.  
  579.      plplot
  580.         slick scientific data plotting
  581.  
  582.   The Emacs support in misc/mgr.el and misc/mailcap includes very usable
  583.   MIME support, via Rmail and metamail.
  584.  
  585.   A general image viewer could be cobbled together from pilot and the
  586.   netPBM filters, but I have not taken the time to do it.
  587.  
  588.   5.  Programming for MGR
  589.  
  590.   The MGR programmers manual, the C language applications interface, is
  591.   found in the doc directory in troff/nroff form.  It covers general
  592.   concepts, the function/macro calls controlling the server, a sample
  593.   application, with an index and glossary.
  594.  
  595.   Porting client code used with older versions of MGR sometimes requires
  596.   the substitution of
  597.  
  598.            #include <mgr/mgr.h>
  599.  
  600.   for
  601.  
  602.            #include <term.h>
  603.            #include <dump.h>
  604.  
  605.   and clients using old-style B_XOR, B_CLEAR, et al instead of BIT_XOR,
  606.   BIT_CLR, et al can be accommodated by writing
  607.  
  608.            #define OLDMGRBITOPS
  609.            #include <mgr/mgr.h>
  610.  
  611.   Compiling client code generally requires compiler options like the
  612.   following.
  613.  
  614.       -I/usr/mgr/include   -L/usr/mgr/lib -lmgr
  615.  
  616.   One can get some interactive feel for the MGR server functions by
  617.   reading and experimenting with the mgr.el terminal driver for GNU
  618.   Emacs which implements the MGR interface library in ELisp.
  619.  
  620.   The usual method of inquiring state from the server has the potential
  621.   of stumbling on a race condition if the client also expects a large
  622.   volume of event notifications.  The problem arises if an
  623.   (asynchronous) event notification arrives when a (synchronous) inquiry
  624.   response was expected.  If this arises in practice (unusual) then the
  625.   MGR state inquiry functions would have to be integrated with your
  626.   event handling loop.
  627.  
  628.   The only major drawing function missing from the MGR protocol, it
  629.   seems, is an area fill for areas other than upright rectangles.  There
  630.   is new code for manipulating the global colormap, as well as
  631.   (advisory) allocation and freeing of color indices owned by windows.
  632.  
  633.   If you are thinking of hacking on the server, you can find the mouse
  634.   driver in mouse.* and mouse_get.*, the grotty parts of the keyboard
  635.   interface in kbd.c, and the interface to the display in the
  636.   src/libbitblit/* directories.  The main procedure, much
  637.   initialization, and the top level input loop are in mgr.c, and the
  638.   interpretation of escape sequences is in put_window.c.
  639.  
  640.   6.  More documentation
  641.  
  642.   The programmer's manual is essential for concepts.
  643.  
  644.   Nearly all the clients supplied come with a man page which is
  645.   installed into /usr/mgr/man/man1 or man6.  Other useful man pages are
  646.   bitblit.3, font.5, and bitmap.5.  There is some ambiguity in the docs
  647.   in distinguishing the internal bitmap format found in your frame-
  648.   buffer and the external bitmap format found in files, e.g. icons.
  649.  
  650.   The mgr.1 man page covers command line options, commands in the
  651.   ~/.mgrc startup file, mouse and menu interaction with the server, and
  652.   hot-key shortcuts available on systems with such hot-keys.
  653.  
  654.   Many of the fonts in /usr/mgr/font/* are described to some extent in
  655.   /usr/mgr/font/*.txt, e.g. /usr/mgr/font/FONTDIR.txt gives X-style font
  656.   descriptions for the fonts obtained in .bdf format.  Font names end in
  657.   WxH, where W and H are the decimal width and height in pixels of each
  658.   character box.
  659.  
  660.   7.  Credit for MGR
  661.  
  662.   Stephen Uhler, with others working at Bellcore, was the original
  663.   designer and implementer of MGR, so Bellcore has copyrighted much of
  664.   the code and documentation for MGR under the following conditions.
  665.  
  666.       * Permission is granted to copy or use this program, EXCEPT that it
  667.       * may not be sold for profit, the copyright notice must be reproduced
  668.       * on copies, and credit should be given to Bellcore where it is due.
  669.  
  670.   One required showing of the copyright notice is the startup title
  671.   screen.
  672.   Other credits to:
  673.  
  674.   ╖  Stephen Hawley for his wonderful icons.
  675.  
  676.   ╖  Tommy Frandsen for the VGA linux library.
  677.  
  678.   ╖  Tom Heller for his Gasblit library.
  679.  
  680.   ╖  Andrew Haylett for the Mouse driver code.
  681.  
  682.   ╖  Dan McCrackin for his gasblit->linux patches.
  683.  
  684.   ╖  Dave Gymer, dgymer@gdcarc.co.uk, for the Startrek effect fix.
  685.  
  686.   ╖  Alex Liu for first releasing a working Linux version of MGR.
  687.  
  688.   ╖  Lars Aronsson (aronsson@lysator.liu.se) for text2font and an
  689.      ISO8859-1 8-bit font.
  690.  
  691.   ╖  Harry Pulley (hcpiv@grumpy.cis.uoguelph.ca,
  692.      hcpiv@snowhite.cis.uoguelph.ca) for the Coherent port.
  693.  
  694.   ╖  Vance Petree & Grant Edwards & Udo Munk for their work on Hercules.
  695.  
  696.   ╖  Udo Munk for his work on serial mouse initialization & select.
  697.  
  698.   ╖  Norman Bartek & Hal Snyder at Mark Williams Co.  for their help
  699.      with some bugs & with Coherent device drivers.
  700.  
  701.   ╖  Extra thanks to Zeyd Ben Halim for lots of helpful patches,
  702.      especially the adaptation of selection.
  703.  
  704.   ╖  Bradley Bosch, brad@lachman.com, for lots of patches from his 3b1
  705.      port, which fix bugs and implement new and desirable features.
  706.  
  707.   ╖  Andrew Morton, applix@runxtsa.runx.oz.au, who first wrote the cut-
  708.      word code.
  709.  
  710.   ╖  Kapil Paranjape, kapil@motive.math.tifr.res.in, for the EGA
  711.      support.
  712.  
  713.   ╖  Michael Haardt for MOVIE support fixes, bug fixes, separation of
  714.      the libbitblit code into output drivers, expansion of the libmgr,
  715.      and origami folding of the code.
  716.  
  717.   ╖  Yossi Gil for many fonts.
  718.  
  719.   ╖  Carsten Emde, carsten@thlmak.pr.net.ch, for mphoon.
  720.  
  721.   ╖  Vincent Broman for middle mouse-button emulation, linting, Sun
  722.      cgsix support, VGA colormap acess, integration of the sunport code
  723.      into Haardt's layering scheme, font gathering, the screen saver,
  724.      and continued maintenance.
  725.  
  726.   ╖  Kenneth Almquist, ka@socrates.hr.att.com, for helpful bug reports.
  727.  
  728.   ╖  Tim Pierce, twpierce@midway.uchicago.edu, for the port to FreeBSD
  729.      2.0R with Trident VGA.
  730.  
  731.   All bitmap fonts from any source are strictly public domain in the
  732.   USA.  The 583 fixed-width fonts supplied with MGR were obtained from
  733.   Uhler, the X distribution, Yossi Gil, and elsewhere.  The Hershey
  734.   vector fonts and the code for rendering them are probably freely
  735.   redistributable.
  736.  
  737.