Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!SABER.COM!oj From: oj@SABER.COM Newsgroups: comp.windows.x.motif Subject: Re: Resources & Forking Message-ID: <9011301435.AA03980@test4> Date: 30 Nov 90 14:35:30 GMT References: <3673@exodus.Eng.Sun.COM> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 32 In article <1990Nov28.191838.4990@arnor.uucp> gah@ibm.com (Gary Hoffman) writes: > 1) Is it possible to use X to read an X resource files without > being connected to a server? Dan Heller responded... No. You must be connected to the server in order for the Xlib routines to access the database associated with it (you can have a resource file unique to every server). Wait a bit. XrmGetFileDatabase will read a single resource FILE without requiring a connection to a server. There's just one thing a program can't do without a display connection: retrieve a RESOURCE_MANAGER property from a server (presumably written there at the beginning of the user's session with xrdb). You could write a routine to replicate what happens (resource-wise) during XtInitialize for a user who had not run xrdb. This routine would read and merge a series of resource files, including $HOME/.Xdefaults. You would need to look at the Xt sources to be sure you're duplicating the functionality precisely. You might find such a thing useful. However, many users exploit the fact that xrdb defines symbols like WIDTH, HEIGHT, and COLOR, then runs the C preprocessor over its input. This means that resource files designed to be read by xrdb can't necessarily be read correctly by XrmGetFileDatabase. Ollie Jones Saber Software, Inc.