On Sun, 8 Dec 2002, Alex Shnitman wrote:

> Quoting Oron Peled <[EMAIL PROTECTED]>:
>
> [...]
> > After looking at the pros/cons of each mechanism, I think it will be
> > illuminating to present another very old mechanism:
> >     The X toolkit resource database:
>
> There's one parameter you didn't mention, and that's whether it's possible for
> the application to change and save its own settings. The ability to do that
> easily is a very important feature of the "configuration database" approach, and
> something quite hard to do with Xresources.

$ LANG=he_IL strace xcalc 2>&1 |grep XCalc
access("/home/tzafrir/he_IL/XCalc", R_OK) = -1 ENOENT (No such file or directory)
access("/home/tzafrir/he/XCalc", R_OK)  = -1 ENOENT (No such file or directory)
access("/home/tzafrir/XCalc", R_OK)     = -1 ENOENT (No such file or directory)
access("/home/tzafrir/he_IL/XCalc", R_OK) = -1 ENOENT (No such file or directory)
access("/home/tzafrir/he/XCalc", R_OK)  = -1 ENOENT (No such file or directory)
access("/home/tzafrir/XCalc", R_OK)     = -1 ENOENT (No such file or directory)
access("/usr/X11R6/lib/X11/he_IL/app-defaults/XCalc", R_OK) = -1 ENOENT (No such file 
or directory)
access("/usr/X11R6/lib/X11/he/app-defaults/XCalc", R_OK) = -1 ENOENT (No such file or 
directory)
access("/usr/X11R6/lib/X11/app-defaults/XCalc", R_OK) = 0
stat64("/usr/X11R6/lib/X11/app-defaults/XCalc", {st_mode=S_IFREG|0444, st_size=19361, 
...}) = 0
open("/usr/X11R6/lib/X11/app-defaults/XCalc", O_RDONLY) = 14
read(14, "! $XConsortium: XCalc.ad,v 1.13 "..., 19361) = 19361

As you can see, even the simple xcalc reads a number of config files
before it starts. This is the behaviour of the X Toolkit. This gives
plenty of places to either me or to my sysadmin / package-manager to add
extra configuration directives. Note that I caneven add language-dependent
directives (although noawadays gettext is usually used for
language-dependent labels)

IIRC AcroRead actually saves its settings as X resources file in the
user's home dir.

-- 
Tzafrir Cohen
mailto:[EMAIL PROTECTED]
http://www.technion.ac.il/~tzafrir



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to