MIT X11 and sunView simulataneous (adjacent) on single-fb Suns!

Ken Manheimer klm at cme.nist.gov
Thu Oct 5 09:17:45 AEST 1989


Probably about a year ago i posted a method i came up with for running X11
in the color frame buffer of a sun 3/60 while running Sunview in the mono
frame buffer.  As i didn't have a multi-buffer 3/60 it wasn't (i thought)
of much use for me.  I recently stumbled across a trick that allows anyone
with a Sun to run, in a definitely kludgy but still eminently useful way,
both X11 and Sunview simultaneously and adjacently with very little (but
still some) interference between the two.  I'm going to explain below what
you need to do to do this.

First of all, i've only tested this under Sun OS 4, so i don't know if it
works under any 3.x versions.  I've tested it on both 3/50's and 3/60's,
though, so i don't think the type of Sun hardware (and particularly frame
buffer(s)) is a consideration.  I wouldn't be surprised if this finagle
works under 3.x OS as well, but i don't guarantee it...

You have to make sure there is a specific frame buffer device in addition
to /dev/fb defined for your machine.  On the 3/60 and 3/50 that's
/dev/bwtwo0.  I'm going to refer to /dev/bwtwo0 in my examples below, but
you should be able to substitute whatever you have instead.

Make certain that the specific frame buffer device is created in /dev (eg,
as root, 'cd /dev; MAKEDEV bwtwo0').

Make a file that contains at least the following two lines (or equivalent
suitable ones):

xinit -- Xsun -dev /dev/bwtwo0
adjacentscreens -c /dev/fb -t /dev/bwtwo0

Supposing you named this file ~/.XandSunview, start up Sunview with the
following command:

'sunview -s ~/.XandSunview'

Sunview will start up and you will see X start up, but the cursor will
really start out in the sunview screen.  To go to the X screen simply move
the cursor above the top of the current screen.  (You can change the
adjacency using different options to adjacentscreens.  See the man page.)

As i mention above, there is some kludgyness to this scheme - the display
output is not handled perfectly, but it the mutual interference is limited
to ouput and turns out to be quite manageable.  You will always have to
refresh when you move between screens, and if there is new output that
would show in the environment that you're not currently occupying it will
show "through".  If you have things that are going to continue to produce
output while you're in the other environment you can always close the
windows to icons before you go and then there'll be no interference.

I use this so i can run the new release of frame (which is drastically
much nicer than the one that runs under X) in sunview while doing
everything else in X, and it's entirely adequate to this purpose.  Really,
a major win...

What i figure is going on is that adjacentscreens takes care of the mouse
and keyboard input as if /dev/fb and /dev/bwtwo0 are two different
contexts, despite the fact that those two contexts address the same
frame-buffer memory.  Thus your input goes to the windows you mean for it
to go to, but the output get's interspersed.

This may sound more grody than it really is.  In general things in one
environment don't do much while you're in the other, and you can always
close them up before you go away.  At least for having access to some
special purpose application in the environment you don't normally inhabit
this kludge should prove worthwhile.

It may turn out that NeWS/X11 (due out for Sun3 machines Oct 25, i
understand) totally reconciles X11/NeWS *and* sunview, and so obliviate
the need for this bizarreness, but until i see a better way i'm real happy
that this is available.  I only wish i had found it sooner.

Ken Manheimer		 	Nat'l Inst of Standards and Technology
(301) 975-3539			(Formerly "National Bureau of Standards")
klm at cme.nist.gov		CME, Factory Automation Systems Division
or ..!uunet!cme-durer!klm	Integrated Systems Group



More information about the Comp.sys.sun mailing list