Installing MGR

# 3 Installing MGR

Contents of this section

The latest version can be FTPed from `bugs.nosc.mil:pub/Mgr/62`. You can get older MGR sources from `ftp.thp.uni-koeln.de` 134.95.64.1 in `pub/linux/mgr`, or on 134.95.80.1 in `pub/thp/linux/mgr`, if you can't reach the first site. Even older versions of this distribution from Haardt can be found on `tsx-11.mit.edu` and elsewhere. Pre-Linux versions of MGR from Uhler and others (prior to Haardt) can be found at `bellcore.com:pub/mgr`, although no one seems to maintain things there. MGR has been through a lot of versions and releases, but the current *Linux* version number is 0.62. This version number ought to arrive at 1.0 when 256-color VGA code for Linux appears.

Required tools to build this distribution of MGR are m4 (GNU, or perhaps another supporting the -D option), make (GNU, or perhaps another supporting include) and *roff for the docs. Also sh, awk, and POSIX install. Binary distributions have not been assembled yet, so you need an ANSI C compiler environment, e.g. gcc + gas.

A Linux installation requires Linux 0.99.10 or better, an HGC, EGA, VGA, or SVGA graphics card, and a mouse. Mouses supported are: serial Microsoft mouse, serial MouseSystems 3 and 5 byte mouse, serial MMSeries mouse, serial Logitech mouse, PS/2 mouse, or a bus mouse. The VGA 640x480 monochrome graphics mode is supported out of the box, as is 640x350 and 640x200. To run 800x600, or other modes that your BIOS can initialize and which do not require bank-switching, you need to run a small program (supplied as `src/vgamisc/regs.exe`) under DOS to read the VGA registers while that mode is set and write a header file which you place in the directory `src/libbitblit/linux`. Some VGA cards can use 128k windows, and these can run higher resolutions. The Linux code does not yet support more than two colors.

Suns with SunOS 4.1.2 and `bwtwo`, `cgthree`, or `cgsix` frame buffers are supported. Coherent installations should refer to the `README.Coh` file in the source distribution. Porting the latest-and-greatest MGR to another POSIX-like system which provides `select()` and pty's and direct access to a bitmapped frame-buffer ought to be straightforward, just implementing the `libbitblit` library based on the `sunmono` or `colorport` code, say.

If you want to install everything, you need 4.8 MB disk space for binaries, fonts, manual pages etc. The sources are about 2 MB, plus object files during compilation.

Normally, `/usr/mgr` should be either the directory or a link to the directory where you install MGR stuff for runtime use. Typing

> `

>     chdir /usr/mgr; gunzip < whereveryouputit/mgrusr.tgz | tar xvf -

> `

and optionally

> `

>     chdir /usr/mgr; gunzip < wherever/morefonts.tgz | tar xvf -

> `

will unpack these. The source can be put anywhere, e.g. typing

> `

>     chdir /usr/src/local/mgr; gunzip < wherever/mgrsrc.tgz | tar xvf -

> `

to unpack the sources from `bugs.nosc.mil`.

The source tree can be compiled from one top-level Makefile which invokes lower-level Makefiles, all of which "include" a `"Configfile"` at the top level. The `Configfile` is created by an interactive sh script named `Configure`, which runs m4 on a `Configfile.m4`, so you do something like this:

> `

>     chdir /usr/src/local/mgr
>     sh ./Configure
>     make first
>     make depend
>     make install
>     make clean

> `

It might be wise, before running make, to eyeball the `Configfile` generated by the `Configure` script, checking that it looks reasonable. (At least one m4 poops out, creating a very short `Configfile`. If this happens, try editing a copy of `Configfile.sun` or `Configfile.lx`) Several flags in MGRFLAGS can be added/omitted to change some optional features in the server, viz:

-DWHO

  muck utmp file so "who" works

-DVI

  code for clicking the mouse in vi moving the cursor

-DDEBUG

  enable debugging output selectable with -d options.

-DFASTMOUSE

  XOR the mouse track

-DBUCKEY

  for hot-key server commands without mousing

-DPRIORITY

  for priority window scheduling instead of round-robin; the active window gets higher priority

-DCUT

  for cut/paste between windows and a global snarf buffer

-DALIGN

  forces window alignment for fast scrolling (monochr)

-DKILL

  kills windows upon tty i/o errors

-DSHRINK

  use only some of the screen ($MGRSIZE in environment)

-DNOSTACK

  don't permit event stacking

-DBELL

  really ring the bell

-DKBD

  read `mgr` input from the sun kbd, instead of stdin. This permits redirection of console msgs to a window.

-DFRACCHAR

  fractional character movement for proportional fonts

-DXMENU

  extended menu stuff (experimental)

-DMOVIE

  movie making extension which logs all operations to a file for later replay -- not quite working under Linux

-DEMUMIDMSBUT

  Emulate a missing middle mouse button by chording

Not all combinations of these options work on all systems.

If a make complains about the lack of a `default_font.h` or an `icon_server.h` in the directory `src/mgr`, then just do a

> `

>     make default_font.h icon_server.h

> `

in that directory. C code for the static variables containing icons and fonts is generated by a translator from icon and font files.

Not all the clients are compiled and installed by the Makefiles. Clients found under `src/clients` having capitalized names or not compiled by the supplied Makefiles may have problems compiling and/or running, but they may be interesting to hack on. Several screen drivers found under the `libbitblit` directory are of mainly archeological interest. Grave robbing can be profitable.

At some point check that your `/etc/termcap` and/or `terminfo` file contain entries for MGR terminals such as found in the `misc` directory. If all your software checks $TERMCAP in the environment, this is not needed, as long as you run `set_termcap` in each window.

MGR works better if run setuid root, because it wants to chown ptys and write in the utmp file. This helps the ify iconifier client work better and the event passing mechanism be more secure. On Linux, root permissions are required in order to do in/out on the screen device. Otherwise, you decide whether to trust it.

In versions around 0.62 there are troubles on the Sun with using the csh as the default shell. Programs seem to run in a different process group than the foreground process group of the window's pty. There is no trouble with bash, sh, or rc. Ideas why?

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter