[comp.windows.x.motif] Motif in a VMS environment, app-defaults file

pjp@sloth.mlb.semi.harris.com (Pat J. Pinchera) (01/17/91)

I am trying to use an app-defaults file on a VAXstation (VMS) running
Motif 1.1. Does anyone know what directory it belongs in? My application
running on Ultrix (DECstation, Motif 1.0) finds the app-defaults file
OK, but now that I'm in a VMS environment, it does not.

Also, are there any VMS specific 'gotchas' I should be looking out for?
Seems the documentation (OSF, Young, etc.) are all geared toward UNIX.


Patrick Pinchera
Interface & Control Systems
Melbourne, FL

tp@mccall.com (Terry Poot) (01/17/91)

In article <1991Jan16.201229.3162@mlb.semi.harris.com>,
pjp@sloth.mlb.semi.harris.com (Pat J. Pinchera) writes:
>I am trying to use an app-defaults file on a VAXstation (VMS) running
>Motif 1.1. Does anyone know what directory it belongs in? My
>application
>running on Ultrix (DECstation, Motif 1.0) finds the app-defaults file
>OK, but now that I'm in a VMS environment, it does not.

Major gripe: This is NOT documented in the manuals (I just searched them
thoroughly yesterday for this particular tidbit). Here's what I've
managed to work out based on what I've seen on the net and the ONE
existing documentation reference (in the section on creating shareable
FileView setups!). 

For you own (i.e. user) application default files, they are contained in
the directory pointed to by DECW$USER_DEFAULTS, which defaults to
SYS$LOGIN (which is why you have all those DECW$*.DAT files lying around
in there). Note that the window manager and session manager resource
files will always be in sys$login, even if you change DECW$USER_DEFAULTS
in your DECW$LOGIN.COM (another undocumented feature, it runs during
session manager startup, the corresponding system wide file is
SYS$MANAGER:DECW$SYLOGIN.COM). 

Since there is also a DECW$SYSTEM_DEFAULTS logical name, that would seem
to me to be where you would install the system wide application defaults
files (I haven't tried it, however, but read on). If you do a show
logical on DECW$SYSTEM_DEFAULTS, you get:

   "DECW$SYSTEM_DEFAULTS" = "SYS$COMMON:[DECW$DEFAULTS.USER]" 
        = "SYS$COMMON:[DECW$DEFAULTS.SYSTEM]"
        = "SYS$LIBRARY:"

Which means (this is an educated guess) that application defaults files
will be searched for in the three directories listed, in order. Note
further the .SYSTEM and .USER directories. The intent here seems to be
that DEC supplied application default files should go in .SYSTEM,
whereas user installed application default files belong in the .USER
directory. I don't know why they put SYS$LIBRARY in there, I'd think
they'd want to keep this stuff separate, but who knows. 

Anyway, if you look in SYS$COMMON:[DECW$DEFAULTS.SYSTEM], you will
indeed see lots of resource files for the standard DECwindows
applications. There is one related to display postscript in SYS$LIBRARY.
Of the layered products I have, all but one stored its resource files in
SYS$LIBRARY, but one (PCA) put them in SYS$COMMON:[DECW$DEFAULTS.USER].
Seems DEC has yet to rigidly adopt any internal standards on this
stuff.

My bottom line guess would be that you should put your files in
SYS$COMMON:[DECW$DEFAULTS.USER]. If you are nervous about a future
system upgrade messing with them (it is something I would think about),
you can either keep separate copies elsewhere as insurance, or you could
redefine DECW$SYSTEM_DEFAULTS to include your own site-specific
directory before the other 3. Be sure to put yours first, and be sure to
put the other three in as is. No telling what code you'd break
otherwise. You can either do this in your system wide sylogin.com as a
/JOB logical, or you can do it system wide, in the system startup file.
The first is more supported and less error-prone. If you do the latter,
be very sure to define the logical with the /SYSTEM/EXEC qualifiers,
since that is how the original is defined.

The worst thing about DECwindows is its abysmal documentation. Many
things are just plain missing. No macros are documented (yes they have a
reason for this, but to find mention of it you'll have to read the .h
files). Also, try to find the calling sequence for an event handler (as
installed by XtAddEventHandler)! There are many other problems. Nothing
about the environment in which the programs run is documented, only the
library routines themselves (and that sparsely). What you are asking is
information of this type. Also, there is no documentation on resources
for DEC supplied applications. I have yet to find something that will
tell me all the keysyms for my LK201 keyboard (anyone know the keysym
for the DO key?). Etc., etc., etc., ad nauseum. 

>Also, are there any VMS specific 'gotchas' I should be looking out for?
>Seems the documentation (OSF, Young, etc.) are all geared toward UNIX.

Can't help you there, still waiting for my Motif developers kit. The big
gotcha I know about is XtAddInput. It does _NOT_ use a file descriptor
on VMS. Read the documentation carefully if you need it. (I understand
that this particular argument is _defined_ to be system specific, so the
VMS implementation is not incorrect, but it is different from what you
will see in books, which as you note are all unix oriented.)
--
Terry Poot <tp@mccall.com>                The McCall Pattern Company
(uucp: ...!rutgers!ksuvax1!mccall!tp)     615 McCall Road
(800)255-2762, in KS (913)776-4041        Manhattan, KS 66502, USA