Path: utzoo!attcan!uunet!clyde.concordia.ca!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!orion.oac.uci.edu!uci-ics!ucla-cs!tek From: tek@penzance.cs.ucla.edu Newsgroups: comp.windows.x Subject: resources Message-ID: <36159@shemp.CS.UCLA.EDU> Date: 11 Jun 90 22:14:24 GMT Sender: news@CS.UCLA.EDU Reply-To: tek@CS.UCLA.EDU (Ted Kim (Random Dude)) Organization: UCLA Lines: 94 There seem to be so many ways to set your resources. I have tried to enumerate all of them here. Please tell me if I have forgotten any. Toolkit Programs ---------------- In order of descending precedence: 1. Command Line standard arguments include: A. command switches (-display, -fg, -foreground, +rv, etc.) B. resource manager directives (-name, -xrm) C. natural lanaguage directive (-xnllangauge) 2. User Environment File use the first source found from: A. file named by XENVIRONMENT environment variable B. $HOST/.Xdefaults- file 3. Server/User Preference Resources use the first source found from: A. RESOURCE_MANAGER property on root window (screen 0) B. $HOME/.Xdefaults file 4. Application User Resources use the first "class" file found by XtResolvePathname using the: A. search path defined by the XUSERFILESEARCHPATH environment variable B. search path based on the XAPPLRESDIR environment variable: $XAPPLRESDIR/%L/%C:$XAPPLRESDIR/%l/%C:$XAPPLRESDIR/%C:$HOME/%C C. default search path: $HOME/%L/%C:$HOME/%l/%C:$HOME/%C 5. Application Class Resources use the first source found from: A. the "app-defaults" type file found by XtResolvePathname using the: 1) search path defined by the XFILESEARCHPATH environment variable 2) default search path: /usr/lib/X11/%L/app-defaults/%C:/usr/lib/X11/%l/app-defaults/%C:\ /usr/lib/X11/app-defaults/%C B. fallback resources defined by XtAppSetFallbackResources In the specifications above: %C = class name %L = the whole language specification %l = just the language part (no territory or codespec) Special Processing ------------------ 1. Display (using XtOpenDisplay) use the first source found from: A. Program Provided Name B. -display Command Arg C. DISPLAY environment variable 2. Name (using XtOpenDisplay) use the first source found from: A. -name Command Arg B. Program Provided Name C. RESOURCE_NAME environment variable D. basename of argv[0] E. default name of "main" 3. Natural Language use the first source found from: A. Command Line B. Server/User Preference Resources C. LANG environment variable (notice that User Environment File is not used, and Application User and Class Resources depend on langauge) Xlib Programs ------------- Xlib based programs can use: 1. XrmParseCommand to parse command line 2. XGetDefaults uses two sources: A. User Environment File B. Server/User Preference Defaults with instance .