New release of MGR for AT&T 3B1 /7300

Bradley Bosch brad at
Fri Jun 21 08:41:03 AEST 1991

Yes, I'm still here.  I've been a bit busy with other things, but I
still find some time to work on MGR.

I am hoping someone will volunteer to generate installable binary
versions of these source releases (which are now infrequent).

Would some one who is running the current version let me know if I
released the "ify" application before this release?  If I didn't, I'm
sorry, it is a very nice addition to the mgr server, so be sure to get
fix 5.

If you already have and use MGR, you will want to skip to the included
README.fix5 to read about changes included with the latest version.

This is to announce the availability of an update to the beta version of
MGR for the Unix-PC (AT&T 7300, 3B1) computers.  The current version
of this port is available by ftp on (
in ~ftp/pub/unixpc/MGR.  The current README.3B1 file and the README file
for the current fix are included at the end of this posting.

The MGR directory currently contains:

-r--r--r--   1 lenny    visitors   10944 Jun 17 20:47 README.3B1
-r--r--r--   1 lenny    visitors    1692 Jun 17 20:47 README.fix5
-r--r--r--   1 lenny    nuucp       1651 Feb 23  1990 README.ftp
-r--r--r--   1 lenny    visitors 1189284 Jun 17 20:48 mgr+f5.cpio.Z
-r--r--r--   1 lenny    nuucp      34475 Feb 23  1990 mgrfix1.cpio.Z
-r--r--r--   1 lenny    nuucp      30028 Mar  5  1990 mgrfix2.cpio.Z
-r--r--r--   1 lenny    nuucp     127033 May 29  1990 mgrfix3.cpio.Z
-r--r--r--   1 lenny    nuucp     101827 Jul 11  1990 mgrfix4.cpio.Z
-r--r--r--   1 lenny    visitors   90193 Jun 17 20:48 mgrfix5.cpio.Z

The mgrfix5.cpio.Z file contains files changed since the mgr+f4 version.

The mgr+f5.cpio.Z file contains the current complete beta
distribution including fixes 1, 2, 3, 4 and 5.

If you have linked zcat to uncompress, the following commands should
extract the distribution files:

cd dest_directory; zcat /where_ever/mgr_f1.cpio.Z | cpio -icd

Note that I don't use the "B" option when I create the cpio files.

Get the README files for more info on file names and future updates
I will announce major new releases in the comp.sys.3b1 group.

Remember that Brian's Vidpal hardware mod or the vidpal emulator
driver is required to run the current version of MGR on the 3B-1
(Thanks Brian!).  Brian can be reached at botton at by
mail.  Brians kit is easy to install and requires no permanent changes
to the mother board.

This beta version of MGR should only be installed by experienced
Unix-PC (3B-1, 7300) system administrators.  If you don't feel
comfortable with loading new device drivers by hand you should get
help or wait for a cleaner installing distribution.

I have spent a good deal of time on this and I hope that others will
contribute to this environment as well.  I do not intend to be THE
supporter and provider of this windowing system for the 3B1.  I intend
to continue to improve MGR by acting as a central point of integration
for bug fixes and new applications.  If you like MGR and want to
contribute, send me your ideas and I will try to coordinate our

Please report any problems or bugs you find (with any suggested fixes)
to me.

--Brad Bosch
brad at
(708) 505-9100 X307	(Voice mail)


"Read me file" for fix 5 to the beta 3B1 version of MGR.

If you are going to apply this fix to an existing fix level 4 version,
please remove the files listed below before extracting the cpio
archive to prevent errors because of file permissions.

The following commands could be used to extract the fix distribution.

	cd "directory where you build MGR"
	rm `cpio -itc < mgrfix5.cpio`
	cpio -icdv < mgrfix5.cpio

One significant bug fix and one minor enhancement is included in this
release along with a few minor bug fixes.  Also, the screen blank and
startup display patches from David B. Thomas (dt at are
included.  My port of the ify application is included.  I think I may
have released it before, but the dates indicate that it was ported
after fix 4.  If I didn't post it before, have a look at it.  I
couldn't live with out it now that I have it.

The select code caused orphan callouts to be left when interrupted.  This
caused panics when using GNU EMACS configured to use select and with
ptys (not a common configuration for GNU EMACS on he 3B1).

The window startup code has been hacked to place windows created with alt-n
entirely within the bounds of the screen.

Also, a new icon and an even tinyer font is included.

Here are the files which were changed/added.


This file contains release notes and installation notes for the
beta distribution of the 3B1 port of MGR.  See the doc/userman.out
file for a description of MGR and it's C language interface.

See the end of this file for information which may help you decide if you
want to run this software.  This BETA distribution is only recommended
for installation by experienced 3B1 system administrators.

Install Procedure: 

Having at least 2 Meg of memory will help speed up the compiles.  You
will need about 3 Meg of disk space for the source code plus 5 Meg more
to compile all of MGR and 2 Meg to install the binaries, fonts, icons,
and libraries.  Once compiled, you can archive or remove the source
code, leaving just the 2 megabytes of disk space for the installed
package.  The native C compiler (3.51) is known to work.  Gcc is known
to cause problems with the preprocessor and with the large functions in

If you have Doug Gwyn's dirent library, you can compile the demo/msg
directory; Edit demo/Makefile to include msg in the SUBDIR list and
edit demo/msg/Makefile to locate the library.

To install and build MGR and the drivers required, edit and run the
BUILD.3B1 script.  Expect a "Cannot load ./INSTALL" error near the end.
Uninstall the existing pty and nkbd drivers if you have them.  Run the
Install script for the new pty and mouse drivers in the 3b-1 directory
as root (IN THAT ORDER).  Note that after installing the drivers you
should check that pty appears in /etc/lddrv/drivers before kbd.  The
mouse driver has been rewritten to separate it from the nkbd driver it
started life as.  This allows the 3.51m kbd driver features to be used.
If you wish to run mgr with pre 3.51m kernels, be sure to edit the
3b1/mouse/Makefile if you wish to use the functionality of the nkbd
driver (to exchange caps-lock and left-ctrl).

If you use the uipc package (version 2.0 or greater) you should be able
to use it in place of the pty driver included with mgr.  Just make
sure the mouse driver is installed after the uipc driver.  Uipc may be a
fix or two behind on any bug fixes I make to select or pty for the
sake of MGR though.

If you wish to try the demo/msg demos, or if you want the tty[pqr]*
devices to be owned by the user, then make the MGR binary setuid root.
The utmp update code also requires MGR to be setuid root.

It is recommended that you use MGR without the native windowing system.
If you wish to use MGR without the native windowing system, you will
need to edit your .profile to avoid starting UA, and edit your
/etc/inittab and /etc/rc files to avoid use of the window driver.
Sample inittab and rc files can be found in the 3b1 directory here.
Don't forget to put the MGR bin directory in your path.

If you wish to use MGR with UA and wind.o, you may wish to disable the
working icon with the script in the 3b1 directory.  You
can also define UA in the Makefile in the src/port directory to cause
MGR not to use the area of the screen used by smgr and ph.
Alternatives to the use of ph and the error logging part of smgr
are also found in the 3b1 directory.  These alternative do not use
the first line of the screen, so the entire screen can be made
available to MGR.  If you load wind.o, you will be able to run ua
from an MGR window as if it were a remote terminal (MGR mouse
doesn't work for UA).  Note that while wind.o is loaded, the MGR
lock program is not secure since the suspend key can be used to switch
to any other native windows you might have.

If you wish to have MGR or UA started conditionally when you log in, you
can put something like 'if [ "$L0" = mgr ]; then exec mgr; fi' at the
end of your .profile file.  The standard login will place any arguments
which you type after your name when you log in in the L0, L1, etc.
environment variables.  Just add " mgr" to your login name and the
above code will be activated.  (Thanks for the hint Merlin.)

You will also want to install the MGR termcap and MGR terminfo entries
in the usual places.  The termcap and terminfo entries are found in
misc/termcap and misc/mgr.ti respectively.  Use your favorite editor
or shell construct to add the termcap entry to /etc/termcap.  Entries
near the top of /etc/termcap start up faster.  Run tic on mgr.ti as root
to install the terminfo entry in the /usr/lib/terminfo directory tree.

Check out the 3b1/contrib directory for interesting and useful
contributions from other 3b1 users including a patch to allow use
of the WIN/3B TCP/IP package with mgr.

Changes to MGR Functionality:

Enhancements to the cut functionality were adopted from
applix at (Andrew Morton).  The shift or control key
can now be used in conjunction with the system mouse button to click on
a word on the display and have that word sent down stdin as if it had
been typed (cut+paste.  I have also enhanced the code to allow cuts
from any window in which the desired text is entirely visible.  My
enhancements also allow regular cuts from non-active windows when
activated with the alt-c or alt-m keys.  Note that the window the mouse
is over when the cut function is activated is the window the cut must
be made from.  The cut+paste word function is also available via the
alt-x key.

See the sample .mgrc file in the 3b1 directory for examples of how to
lock the screen.  This feature is available from the "quit" menu of MGR
and as the alt-k keyboard sequence (left-cntl)-k.

iconmail, mgrmail, and omgrmail will turn on the user accessible led
when new mail arrives so that you don't have to unlock the screen to
see if you have mail.  Note that since MGR does the bell sound on the
3B1 with an ioctl(), processes can't ring the bell while MGR is waiting
on its child (the lock process) to complete.

This version inverts the sense of black and white from the sun version,
but most of us are used to light on dark now so I plan to leave it this way.

The 3B1 Screen is just too small.  A REALLY small font (smaller than
font 1) has been added (tiny4x7r.fnt).  This font allows for 4 nearly
non-overlapping 80x24 windows.  Try it, but don't send me any eye care

>From dt at (David B. Thomas):

    1. If NOSTARTREK is defined at compile time, the startrek demo is
    not compiled in, significantly reducing the size of the executable
    and not hogging cpu if you have mgr start unattended.

    2. If BLANKING is defined at compile time, the screen will blank auto-
    matically if no keyboard or mouse activity occurs for five minutes.
    Also, "blank screen now" has been added to the main menu.  The blanking
    behavior can be changed by sending escape codes to any window as follows:

    <esc><num>*	blank after <num> seconds (must be positive)
		warning: very short times can cause problems.
    <esc>0*	blank screen now -- does not affect blanking interval
    <esc>-1*	set blanking interval to infinity (disables blanking)

    The way I coded things, the screen will wake up if the mouse is moved, or
    if a keypress is detected.  The keypress is not removed from the input
    stream.  Also, the screen will wake up if any window exposes itself, is
    created, is destroyed, or beeps.  Ordinary output to a window does not
    wake the screen, so you can keep that clock program :-)

						little david

Remaining Porting Issues and Bugs:

There are some applications which I have not ported.  Most of the
remaining work is either trivial or doesn't make sense in the 3B1
environment.  Applications which are thought to be WORKING include:
bounce, browse, bury, client, clock, clock2, close, cursor, cut, cycle,
dmgr, do, font, grav, grid, half, hilbert, hp_raster, hpmgr, iconmail,
loadfont, lock, maze, more, mclock, menu, menus, mgrmail, mgrmode,
mgrplot, oclose, omgrmail, rotate, set_emacs, set_termcap, shape, show,
showfont, snap, square, startup, stringart, tjfilter, vi, walk,
window_print, and zoom.  Other applications may be working, but I don't
remember testing them.

I haven't tested the documentation building code and Makefile on the
3B1.  You should receive an ascii text of the application library
document with the beta distribution.  The man pages should work OK
with nroff -man.

An install disk set should be created and the install scripts for the
drivers may still need some work.

Life on the 3B1 with MGR:

I have found that MGR works well with the UNIX-PC.  It is about 2/3
the speed of the native windowing system for scrolling in similar
size windows and fonts.  Since I never liked UA (I mostly used it to
get several shell windows to do development work) I don't miss it
much.  You can run UA from an MGR window to do things
with the install login etc if you are willing to accept the extra
overhead of wind.o.  I like the extra screen space MGR gives me by
avoiding the waste of the top line and the bottom lines of the
display and the window border features which I never used anyway.
The cut and paste features are very handy.

I expect someone may wish to rewrite the bit blit code to get that
last 1/3 performance improvement.  It would most likely have to be
done in assembler.  The bit blit assembly code found in the ihvdiag
package from the store might make a good starting point.  The current
C version is tuned to the native C compiler about as well as I can
make it and the bit blit function is too large for the gcc compiler
and 2.5 Meg address space.

Freeing up the kernel space used by the native window driver has
several advantages.  It allows other large drivers to be written to
fit in the limited kernel address space.  Some people also have
reported problems with interrupt latency while scrolling text to a
window with the native windowing.  This problem should go away with
MGR since scrolling is done at the user level.

There are some useful applications included with MGR as demos.  The hp
2621 emulator (hpmgr) can help when logging in to another system.
There is more than enough demo code to make it easy to write simple
applications.  We intend to write a windowing communications program
using the UW or XT (layers) protocol.  Since all of MGR's windowing
and graphics can be accessed with standard i/o, all of the remote windows
would be full fledge MGR windows capable of running any MGR
application.  I hope other people will write applications which take
advantage of MGR's strengths.

The nature of MGR is that any (8 bit) communications link can be used
like the network facilities are used in X or NeWS.  This makes this
windowing system more portable and easier to use (I think) than X11 or
NeWS while still maintaining network extensibility.  It is also
considerably smaller than most other full featured windowing systems.
In general, I think it manages to follow the Unix philosophy more
faithfully than any other windowing system I have seen.

--Brad Bosch

(708) 505-9100 x307     (voice mail)

brad at
att!laidbak!brad	(att sites only)

More information about the Comp.sys.3b1 mailing list