#!/bin/sh # $XFree86: mit/clients/xinit/xinitrc.cpp,v 1.3 1993/04/11 13:50:35 dawes Exp $ # $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $ # $Id: .xinitrc,v 1.2 1999/07/02 05:24:38 steve Exp $ # Note (steve@theStarport.org) # This init file is shared by both xinit (startx) and xdm. # This isn't normal practice, but it makes sense. The user # can override this behavior by providing both a .xinitrc and # .xsession in his/her home directory. if [ x"$XWINHOME" != x ]; then XDIR=$XWINHOME/lib/X11 else XDIR=/usr/lib/X11 fi # Make sure /usr/bin/X11 is in the path export PATH=/usr/bin/X11:$PATH ##################################################################### # # Figure out which resources to use. # Since xrdb uses cpp, the user can include the system ones. userresources=$HOME/.Xdefaults sysresources=$XDIR/Xdefaults usermodmap=$HOME/.Xmodmap sysmodmap=$XDIR/Xmodmap if [ -f $userresources ]; then xrdb $userresources else xrdb $sysresources fi ##################################################################### # # Merge user and system modmaps if any [ -f $sysmodmap ] && xmodmap $sysmodmap [ -f $usermodmap ] && xmodmap $usermodmap ##################################################################### # # Set up some default colormaps and a nice root window color # === (xstdcmap commented out because it eats color space that netscape wants) # xstdcmap -all xsetroot -solid blue ##################################################################### # # Clean out lock files. Could cause havoc if you're logged in on # multiple machines, but the average user doesn't do that. [ "$DISPLAY" = ':0.0' ] && rm -f $home/.netscape/lock ##################################################################### # # start some useful programs: # The user can provide a file called .Xapps to start applications. # Otherwise, we pick some. # We also start a windowmanager. It's twm by default; the user can # override this by setting $XWINDOWMANAGER in .profile [ x"$XWINDOWMANAGER" != x ] \ || { [ -f /usr/bin/X11/ctwm ] && XWINDOWMANAGER=ctwm } \ || XWINDOWMANAGER=twm $XWINDOWMANAGER & sleep 10 [ "x$XSCREENSAVER" != "x" ] \ || { [ -f /usr/bin/X11/xscreensaver ] && XSCREENSAVER=xscreensaver } \ || XSCREENSAVER=true nice $XSCREENSAVER & if [ -x $HOME/.Xapps ]; then $HOME/.Xapps else sleep 1; xterm -ls -fn 8x16& if [ -x /usr/bin/X11/dclock ]; then # dclock doesn't look in .Xdefaults.host, only on the server. sleep 1; oclock -geometry 50x50+-3+-3& sleep 1; dclock -name dclock& else sleep 1; oclock -geometry 150x50+-3+-3& fi sleep 1; xbiff -shape& sleep 1; xman& fi ##################################################################### # # Start a console window. Hope that by now the old root console has died. # # Note that .profile can detect $CONSOLE to put out some kind of # helpful message. The user can define $XCONSOLE to override the # default xterm. # sleep 2 CONSOLE=1; export CONSOLE if [ "$XCONSOLE" = "" ]; then exec xterm -C -name console else exec $XCONSOLE fi # $Log: .xinitrc,v $ # Revision 1.2 1999/07/02 05:24:38 steve # Update for domain change. Mostly ready to roll out. # # Revision 1.1 1999/05/10 05:00:14 steve # initial checkin # # Revision 1.9 1995/06/11 18:35:44 guest # That should be xbiff, not biff. # # Revision 1.8 1995/06/11 18:32:13 steve # Re-arrange the clocks. # # Revision 1.7 1995/04/22 06:42:26 steve # Sleep 10 seconds after starting the window manager, to give it time to # initialize before starting the apps. # # Revision 1.6 1995/03/03 03:34:38 steve # nice the screensaver in case there's more than one screen # # Revision 1.5 1994/12/20 15:58:16 steve # added xscreensaver # # Revision 1.4 1994/12/18 22:01:41 root # Made sure /usr/bin/X11 is in the path. # # Revision 1.3 1994/06/26 04:19:16 steve # Added ctwm option # # Revision 1.2 1994/02/28 04:55:30 steve # Added some documentation; force user to use #include in .Xdefaults (which # gives the option of ignoring the system defaults completely); add shell # variable $XCONSOLE to override default xterm console process. #