One way to set defaults for your applications is with environment variables (Section 35.3) that the applications might read. This can get messy, though, if your environment has tens or hundreds of variables in it. A lot of applications have a different way to choose defaults: setup files, similar to shell setup files (Section 3.3). Most of these filenames end with rc, so they're often called RC files.[12] Today's more-complex applications also use their own setup subdirectories. Almost all of these files and directories are hidden (Section 8.9) in your home directory; you'll need ls -A to see them.
[12]Don't ask me why. It's one of those acronyms, like spool (Section 45.2), that's open to interpretation, though one theory is that it is derived from "runcom files," (possibly short for "run commands") on the Compatible Time-Sharing System, c.1962-63 (source: The Jargon File).
This article describes some of the most common setup files. For a more complete list, check your application's manpage:
# If I send mail to "bookquestions", send it to myself too: alias bookquestions [email protected], jerry # When I send a message, prompt me for "cc:" addresses: set askcc
comp.security.announce: 1-118 news.announce.important: 1 comp.org.usenix: 1-1745 comp.sys.palmtops! 1-55069,55071 ...
A newsgroup name ending with a colon (:) means you want to read that newsgroup; an exclamation point (!) means you don't. After each name is a list of the article numbers you've read in that newsgroup; a range like 1-55069 means you've read all articles between number 1 and number 55069.
rodan Allow a user with same username from host rodan foo.bar.com joe Allow username joe from host foo.bar.com
All commands except the last typically end with an ampersand (&), which makes those clients run in the background. The last command becomes the controlling process; when that process exits (for instance, you use the window manager's "quit" command), the window system shuts down. For example:
$Id Section 39.5, exec > Section 36.5, -v Section 35.25, uname -n Section 2.5 , ${..:=..} Section 36.7, export Section 35.3, xrdb Section 6.8, sh -c Section 24.21, exec Section 36.5
#! /bin/sh # $Id: ch03_20.htm,v 1.3 2002/11/05 20:18:59 ellie Exp ellie $ # Usage: .xinitrc [DISPLAY] wm=fvwm2 # window manager # Put all output into log that you can watch from a window (tail -f): mv -f $HOME/tmp/startx.log $HOME/tmp/,startx.log exec > $HOME/tmp/startx.log 2>&1 set -v # Set DISPLAY from $1 if the X server isn't on same host as client: if [ $# -gt 0 ] then if [ $# -ne 1 ] then echo "Usage: .xintirc [DISPLAY]" 1>&2 exit 1 else DISPLAY=$1 fi else host=`uname -n` DISPLAY=${DISPLAY:=$host:0.0} fi export DISPLAY xrdb -load $HOME/.xrdb # # Clients # xterm -C -geometry 80x9+0+0 -sl 2000 & oclock -geometry -1+1 & xterm -title "SETI console" -bg blue -fg white -geometry 80x9+768+1 -e \ sh -c 'cd /var/cache/seti && exec ./setiathome -nice 5 -verbose' & # Don't use -e because Mozilla crashes; start by hand from prompt: xterm -title "Mozilla console" -bg orange -geometry 80x9-0+1 & xterm -geometry 80x74+329-81 & # # Start window manager # exec $wm
--JP and SJC
Copyright © 2003 O'Reilly & Associates. All rights reserved.