how do I tell the size of a pseudoterm window?

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Dec 5 05:03:23 AEST 1988


In article <577 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
>(I presume you can, under layers, somehow arrange to run a program on
>a machine other than the one to which your layers terminal is connected
>and have it interact with layers just as if it were running on that
>machine; if not, X11 does a *better* job than layers does in that
>instance.)

Sure; we routinely use "sam" with the interactive part running in the
terminal and the host file management part running on a system two hops
away.  The important point is that the layer system does not have to
be aware of networking; the host part is run via rexec or equivalent.
In fact "sam" runs on SunOS the same way.  A better job can be done
with streams, but we don't have them on our BSD-based systems, alas.

>The ability to run some of your window system in the terminal,
>including downloaded user-interface code?  You can do that with NeWS,
>assuming you're willing to write the downloaded code in PostScript

Layers terminal code is written in C, which makes it much more
convenient since most of our useful application libraries are in C
already and we don't have to retrain our programmers.  In fact, user
interaction is ALWAYS controlled in layers by code running in the
terminal (either a terminal emulator or some more interesting
application).  This makes it easy to implement text manipulation
between layers, for example.  The layer process can cooperate with
a host system process if necessary, but normally interactive work
does not put the host in the loop.  Thus, layers applications are
entirely usable on a 5620 or 630 terminal at home over 1200bps dialup.
I don't know of anyone who has tried to operate X11 like that.

>Some aspect of the user interface of the window system provided by
>layers?

Layers (xt)-supporting terminals don't dictate "appearance" features,
although the built-in firmware does encourage a much cleaner display
than other windowing systems.  They do provide high-performance
interactive support and non-preemptive real-time task scheduling.
Their graphics primitives are much simpler and more convenient than
anything else I've yet seen, including Sun's and Apple's programming
support systems.  I merged somebody's X11 port of "sam" in with the
others, and at least that usage of the X11 interface is also pretty
ugly by comparison.  I think all these window system designers went
to the same Macintosh school of window programming.

>>Layers aren't just pseudo-terminals, they're much more powerful.
>Oh, really?  Can I use layers to implement, say, 4.xBSD's "script"?

You can use xt/layers to do that, though it would be perverse.

>I'm not sure layers and pseudo-ttys are the same sort of beast, so I'm
>not sure you can say that one is "more powerful" than the other.

All a pty is is a full-duplex stream with a terminal handler stuck
into it.  (Actually, 4BSD ptys aren't quite that.)  A layer is one of
a set of multiplexed streams on a single transmission channel with
reliable data transfer protocol and an intelligent process at each
end.  This is not as general as a simple pty but it has more inherent
power.  You could add stuff onto a pty to bring it up to xt layer
functionality, except for the multiplexing, which systems without
xt or streams multiplexors cannot do very efficiently.  (The context-
switch overhead to multiplex in user mode on BSD systems is horrendous.
We do it anyway because layers is so useful that even an emulation is
better than not having it.)

The only thing X11 seems to have going for it is a variety of vendors
supporting it.  That is probably sufficient for it to take over the
market, just as NFS did despite its technical flaws.  As I said, it's
a pity.  I hate the bandwagon effect..



More information about the Comp.unix.wizards mailing list