[comp.windows.x] app-defaults or xrdb?

tml@hemuli.tik.vtt.fi (Tor Lillqvist) (01/09/90)

Am I correct in assuming that you are supposed to achieve site-wide
defaults by loading resources from some file via xinit or xdm, not by
editing files in /usr/lib/X11/app-defaults?  I.e. the app-defaults
files are to be considered part of the corresponding program's source
code, and shouldn't be edited to provide site-wide settings.

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (01/10/90)

> Am I correct in assuming that you are supposed to achieve site-wide
> defaults by loading resources from some file via xinit or xdm, not by
> editing files in /usr/lib/X11/app-defaults? 

There is no reason not to modify the app-defaults file for site configurations,
that is what is was originally intended for.  Although, You may want to put in a
comment so that people know what you have done locally. 

>  I.e. the app-defaults
> files are to be considered part of the corresponding program's source
> code, and shouldn't be edited to provide site-wide settings.

The app-defaults file is certainly as important to many programs as the source
files, but many applications also have a ``config.h'' file that is also part of
the source...


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213

swick@ATHENA.MIT.EDU (Ralph R. Swick) (01/10/90)

> [query]
> the app-defaults
> files are to be considered part of the corresponding program's source
> code, and shouldn't be edited to provide site-wide settings.

Chris gave a good answer (that app-defaults were intended for
site customization), but I'd like to expand on it just a little
since this is certainly a grey area.  Commercial application
developers are going to want to declare portions of the resource
database 'off-limits' to modification.  While they certainly can
accomplish this with code, I think a gentlepersons agreement on
respecting comments in app-defaults (of the form "!** do not modify **")
will make life generally more pleasant.  Discussions on what those
conventions should be are welcome on this list.

My first suggestion is that site mods to supplied app-defaults
files be made at the bottom (no need to remove earlier specs;
Xrm will very conveniently take care of this), with a comment
of the form

!**** Athena site mods start here ****

-Ralph

asente@decwrl.dec.com (Paul Asente) (01/10/90)

In article <4468@hemuli.tik.vtt.fi> tml@hemuli.tik.vtt.fi (Tor Lillqvist) writes:
>Am I correct in assuming that you are supposed to achieve site-wide
>defaults by loading resources from some file via xinit or xdm, not by
>editing files in /usr/lib/X11/app-defaults?

Nope.  One of the principal motivations for the app-defaults files was to
allow site-wide customizations without having to modify the source code.

	-paul asente
	    asente@decwrl.dec.com	decwrl!asente

dce@smsc.sony.com (David Elliott) (01/10/90)

In article <2417@bacchus.dec.com> asente@decwrl.dec.com (Paul Asente) writes:
>In article <4468@hemuli.tik.vtt.fi> tml@hemuli.tik.vtt.fi (Tor Lillqvist) writes:
>>Am I correct in assuming that you are supposed to achieve site-wide
>>defaults by loading resources from some file via xinit or xdm, not by
>>editing files in /usr/lib/X11/app-defaults?
>
>Nope.  One of the principal motivations for the app-defaults files was to
>allow site-wide customizations without having to modify the source code.

Maybe I've done too much overall systems development, but this seems to
me to be a mechanism that is less than optimal.

When you have a file that is to be overwritten by installation,
customers are given the burden of remembering to save their changes so
that they can be made again.  It's easy to forget to save off a
directory, especially when its almost invisible to you from a user
standpoint.

Because of this, it seems to me that it would be better to have
applications look for a file that isn't part of the standard
distribution, and thus won't be overwritten by a new installation.
For example, the directory /usr/local/lib/X11/app-defaults could
be used for localized app-defaults files.

I realize that this adds complexity to the release, and I'm not sure
it's the "right thing to do".  Maybe the best thing to do is to warn
people to remember to save copies of their changed app-defaults files
somewhere.

-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"Baziotes! Baziotes! Getcha red hot Baziotes here!"