[comp.unix.ultrix] Ultrix/X

bglenden@colobus.cv.nrao.edu (Brian Glendenning) (01/03/91)

I recently got a Decstation 3100 put on my desk (Ultrix 4.0).
I have some questions about using it with X11.

1. I'm told it is an X11R3 server that uses the X11R4 protocol - true?
2. I tried compiling twm from X11R3. It apparently compiled fine, but my
   keystrokes never got to the application (but the border
   highlighting did follow the pointer). What have I done wrong?
3. If I want to bring up X11R4 from MIT so I can compile and run nice
   applications not shipped with the DS.
   a) Can I use the R4 server, and is it fast?
   b) Can I use the DEC server with R4 clients?
   c) Any useful hints for the mechanics of doing this type of mixing.

Thanks!

Brian



--
       Brian Glendenning - National Radio Astronomy Observatory
bglenden@nrao.edu          bglenden@nrao.bitnet          (804) 296-0286

jg@quabbin.crl.dec.com (Jim Gettys) (01/03/91)

In article <BGLENDEN.91Jan2183049@colobus.cv.nrao.edu> bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes:
>
>I recently got a Decstation 3100 put on my desk (Ultrix 4.0).
>I have some questions about using it with X11.
>
>1. I'm told it is an X11R3 server that uses the X11R4 protocol - true?

Emphatically yes.  The X11 referes to PROTOCOL version of X.  The Rx
refers to release from MIT.  There have been NO protocol changes from initial
release of X11, at the wire level.  In some of the earlier releases (R1, R2)
there were often problems running applications between releases, most
often due to instability in font naming (like no
standardization of font naming in R1 days), but R1 based applications
will likely work with an R4 server, unless they happen to depend on
some bug fixed in a later release, if you have fonts of the right names
installed.

There is a minor revision # in the protocol, to potentially allow some upward
compatible changes someday in the wire protocol.  To date, R1-R5 are still
at even the same minor revision of the protocol, and we don't expect any
changes whatsoever while the standards committees do their (incredibly
slow) thing.

>2. I tried compiling twm from X11R3. It apparently compiled fine, but my
>   keystrokes never got to the application (but the border
>   highlighting did follow the pointer). What have I done wrong?

You are better off compiling twm from X11R4, in any case.  In general,
R4 applications should run just fine against R3 servers, unless they really
depend on some extension that did not exist (but this is a general statement,
in anycase.).  A tiny fraction of applications may depend on having some bug
in the server that was fixed in R4; as far as I know, Ultrix applications
all work fine against either an R3 or R4 server at this date (we had some
problems with dxcalendar, which have been fixed by fixing dxcalendar, rather
than adding more "bug compatibility" to the server).

The remaining problems with interoperability of applications come up
with applications (and/or window managers) that are not ICCCM compliant.
This did not get adopted as a standard until R4, and software that
predates the ICCCM may have problems, (I think even some clients in R4
don't conform fully), though most up to date window managers have options
to try to tolerate older, non-ICCCM compliant clients.  This mostly occurs
when running clients with window managers from other environments than
those under which the client was developed.  Hopefully, around the time
R5 comes out (and everyone's products are ICCCM compliant; remember, vendors
have typically 6-15 month lags behind MIT releases, due to their own release
schedules and testing), even these few problems will also be gone.  
I suspect this is what is happening to your R3 twm; I certainly don't see it
with the R4 twm I use every day on my machine.

We certainly aren't going to help you debug an R3 twm :-).


>3. If I want to bring up X11R4 from MIT so I can compile and run nice
>   applications not shipped with the DS.
>   a) Can I use the R4 server, and is it fast?

The R4 server on the DS3100 and DS5000 is fast, though I believe our
server is somewhat faster, particularly on less common graphics operations
(and you get the Display PostScript extension in our servers).  The R4
server does beat us on memory usage, though.  Whether you care, and which
you prefer, depends on details of your precise application mix; 
it will be anywhere from undetectable, to dramatic (in a few cases).
Your milage will definately vary.  Most of us run the DEC server here
at CRL, both for Display PostScript and the additonal performance.
But we are memory rich here; on a minimum memory configuration machine,
you'd probably be best off with an R4 server with save unders and backing
store disabled, for example.  Of course, with third party memory prices
being what they are these days (I wish our prices were at least within
spitting distance... Sigh), such machines are mercifully becoming very rare.

>   b) Can I use the DEC server with R4 clients?

Sure thing.  We do so routinely here at CRL, and tons of other places do as
well.

>   c) Any useful hints for the mechanics of doing this type of mixing.


Not particularly rocket science; the only decision you have to make is
whether you want to replace the DECwindows R3 vintage Xlib, Xt, etc libraries
with R4 ones, or have a seperate build environment.  We maintain a seperate
environment here, and courtesy of Imake, life is pretty trivial.  As to
the mechanics of doing so, build an R4 distribution (patched up to date,
please!), and if you have installed the unsupported MIT clients, you should
delete them entirely, as there is really no point in having (relatively)
buggy R3 MIT clients around at all, when you've installed R4 clients.

When building software, just make sure you build it against appropriate
sets of libraries.  While Xlib should be strictly upward compatible between
R3 and R4, and Xt is mostly upward compatible between R3 and R4, there
are enough terrors lurking in the dark corners to make this rule golden.
Then again, I'd generally recommend just using R4 libraries for any
new code you develop, but if you have some old source around, you may need
to link against old libraries if the source hasn't been updated.

But your applications will generally work just fine no
matter if they are run against an R3, R4, VMS server, or (generally) an
OpenWindows X11/NeWS server.  If they don't (and it is not something
like and ICCCM problem or the right font being installed, or lack
of an alias for a font you don't have; sure will be glad when we have 
font servers!), it is almost always the server vendor's fault, and 
you should complain bitterly.  After all, the name of the X game is 
interoperability.

>
>Thanks!
>       Brian Glendenning - National Radio Astronomy Observatory
>bglenden@nrao.edu          bglenden@nrao.bitnet          (804) 296-0286

You are welcome.  Thankfully, this whole hassle will go away in the
next release which is R4 based.  Sorry it has taken so long to get R4 out,
but the timing was exactly pessimal given the DS5000 schedules
(which required support of 4 graphics devices, all at once).
And since we had already done much of the performance work in our
server that appeared in R4 (the device independent work done by
Joel McCormack of DECWRL in our servers was given to MIT for inclusion in R4), 
the need for us to update to R4 has been much less than other vendors.
Other performance work done at MIT by Keith Packard and Bob Scheifler,
particularly in the area of memory savings, still make it more than worth
updateing our servers, however.

Thankfully, given the stability at the X protocol level, life has not
been really all that bad at all, and I've certainly been running R4 clients
on my DECwindows server from before the day R4 was announced...
				Jim Gettys
				Digital Equipment Corporation
				Cambridge Research Laboratory.

--
Digital Equipment Corporation
Cambridge Research Laboratory

barmar@think.com (Barry Margolin) (01/03/91)

In article <1991Jan3.042524.20774@crl.dec.com> jg@quabbin.crl.dec.com (Jim Gettys) writes:
>In article <BGLENDEN.91Jan2183049@colobus.cv.nrao.edu> bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes:
>>2. I tried compiling twm from X11R3. It apparently compiled fine, but my
>>   keystrokes never got to the application (but the border
>>   highlighting did follow the pointer). What have I done wrong?
>This did not get adopted as a standard until R4, and software that
>predates the ICCCM may have problems,
...
>I suspect this is what is happening to your R3 twm; I certainly don't see it
>with the R4 twm I use every day on my machine.

Actually, it sounds like an R3 TWM bug that hit me quite a bit.  If the
.twmrc binds any keys that don't exist on the terminal you're using, no
keyboard input is ever sent to client windows.

Most users never noticed it, but if you switched between different
terminals with different special function keys, and tried to bind actions
to keys that they don't have in common, the problem rears its head.  The
workaround was to have multiple .twmrc files and rename them prior to
starting twm.
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

bglenden@colobus.cv.nrao.edu (Brian Glendenning) (01/05/91)

With the promising advice I got after my first reply I decided to
press on and try bringing up X11R4 from MIT.

All was going well until it actually tried to build the server, at
which point it died with missing include files, e.g.
<machine/pmreg.h>.

I am assuming that these files disappeared or were subsumed when
Ultrix 3.x was upgraded to 4.x. Is there a patch to get the MIT server
to run under Ultrix 4.x? (I mostly want some clients, but I might as
well compile the server if possible). I looked on a few likely ftp
sites but didn't see such any obvious candidates for such a patch.

Also, using gcc vs cc made used to make dramatic differences on the
performance of MIT X on Suns, is the same true of the DEC RISC
machines (I have been using cc). Thanks again.

Brian
--
       Brian Glendenning - National Radio Astronomy Observatory
bglenden@nrao.edu          bglenden@nrao.bitnet          (804) 296-0286

evans@decvax.DEC.COM (Marc Evans) (01/07/91)

In article <BGLENDEN.91Jan4200238@colobus.cv.nrao.edu>, bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes:
|> [...]
|> All was going well until it actually tried to build the server, at
|> which point it died with missing include files, e.g.
|> <machine/pmreg.h>.
|> [...]

The location of these files moved (one even changed name slightly). You should
be able to locate everthing that you need by doing a 'find /usr/include -name
pmreg.h -print' and then changing the references as needed in the X sources.

- Marc
-- 
===========================================================================
Marc Evans - WB1GRH - evans@decvax.DEC.COM  | Synergytics     (603)635-8876
      Unix and X Software Contractor        | 21 Hinds Ln, Pelham, NH 03076
===========================================================================

gringort@wsl.dec.com (Joel Gringorten) (01/08/91)

In article <BGLENDEN.91Jan4200238@colobus.cv.nrao.edu>, bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes:
|> 
|> All was going well until it actually tried to build the server, at
|> which point it died with missing include files, e.g.
|> <machine/pmreg.h>.
|> 

Those include files have been moved to /sys/io/tc/.  Make links to them or copy
them to the /sys/machine/mips (which is a link to /usr/include/machine) or edit
the sources to point to the right place.  

|> Also, using gcc vs cc made used to make dramatic differences on the
|> performance of MIT X on Suns, is the same true of the DEC RISC
|> machines (I have been using cc). Thanks again.

I haven't heard of any dramatic differences.  Try it and let us know :-)

-joel

sowa@amdew.llnl.gov (Erik C. Sowa) (01/08/91)

I have been following the thread about putting X11R4 up on Ultrix 4.x.
It seems that, for me, the best solution would be to keep running the
dec servers and have a build directory for making R4 clients and other
stuff from the archives. Does anyone have any suggestions for making
such a build directory painlessly? Perhaps a special file site.def?

I also ran into the problem with the include files, e.g. pmreg.h, which
were moved between ultrix 3.1 and 4.0. I found most of them, but
dc7085cons.h is nowhere to be found. Is this the same as the 4.0 file
dc7085reg.h?

When running the new R4 xmh under DECwindows, the meta-key shortcuts do
not work. twm and emacs both use the compose-character key for meta, why
doesn't this work here? Do I need to remake the Athena widgets with some
special attention to this @#$%#%^@$ keyboard?

xterm would not compile at all. There was a problem with a line
something like
  fileno(stderr) = i

Thanks for any help...


***** Wahoo 5 *****
erik sowa (sowa@amdew.llnl.gov, sowa@cms1.llnl.gov)

jtkohl@MIT.EDU (John T Kohl) (01/08/91)

In article <88897@lll-winken.LLNL.GOV> sowa@amdew.llnl.gov (Erik C. Sowa) writes:

> When running the new R4 xmh under DECwindows, the meta-key shortcuts do
> not work. twm and emacs both use the compose-character key for meta, why
> doesn't this work here? Do I need to remake the Athena widgets with some
> special attention to this @#$%#%^@$ keyboard?

Probably not; try using 'xmodmap' to make the compose-character key into
a Meta_L key.  However, if you do this, some true DECwindows
applications may malfunction if they expect to be able to use/detect a
true compose character key.

Here's what I use in a file I feed to xmodmap; this works
on both DECwindows servers and X11R4 servers (since I use the keycode):

! 177 is the Compose Character key on the LK201
! this is needed to insure that it's really a meta key
keycode 177 = Meta_L
keysym comma = comma less
keysym period = period greater
--
John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@MIT.EDU>
Digital Equipment Corporation/Project Athena
(The above opinions are MINE.  Don't put my words in somebody else's mouth!)

grahj@gagme.chi.il.us (jim graham) (01/11/91)

In article <BGLENDEN.91Jan4200238@colobus.cv.nrao.edu>, bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes:
> 
>|> Also, using gcc vs cc made used to make dramatic differences on the
>|> performance of MIT X on Suns, is the same true of the DEC RISC
>|> machines (I have been using cc). Thanks again.

This may be related to something I've noticed, and may not....but if anyone has
the answer to this one, I'd really like to know it!

I'm running Ultrix 4.0 on a vaxstation 3100, have not yet compiled MIT X11R4
(waiting for a big hard disk to come in...then I compile it), so I'm running
the DEC server.  However, I have compiled some of my favorite MIT versions of
clients, some of which aren't even provided with Ultrix.

Here's the problem.  When I run twm (which I prefer greatly over dxwm!), it
seems to have a serious negative impact on the performance of many
applications.  One that really shows this effect is "xlock -mode qix" --- the
patterns are really slow and choppy.....

Has anyone noticed this, and does anyone know what the problem/fix is?
Please respond via direct email, as I sometimes don't beat the expiration on
news here....I'll post a summary if anyone wants me to.

Thanks,
Jim Graham

------------------------------------------------------------------------------
Share and Enjoy!  (Sirius Cybernetics Corporation, complaints division)
73, de n5ial 
 
TCP/IP:    jim@n5ial.ampr.org --- 44.72.0.88
Packet:    n5ial@wb9mjn (Chicago, IL USA) 
Internet:  grahj@gagme.chi.il.us
------------------------------------------------------------------------------