[comp.sys.apollo] UNIX "Dot" Files

system@aurum.chem.utoronto.ca (System Admin (Mike Peterson)) (01/07/91)

In response to many requests for this,
here is an updated text of my talk at the 1990 ADUS meeting on UNIX "Dot"
files. New stuff is mainly for 'mwm' (Motif), but some other minor
improvements have been done (Korn shell stuff now present too).
It is formatted for 66 lines per page.

Note that this file includes exact copies of the "dot" files in use on
our Apollo systems, but I have numbered the lines. Also, some lines are
too long, so they have been split (AFTER numbering, so the split pieces
do not have a line number - simply join them back together). All split
lines were split at a blank/tab, so make sure a blank separates the
rejoined pieces. Then remove the line numbers from the section of this
file. We are a BSD-only installation, so you may have problems with
SYS5 sites due to missing commands or commands with different
arguments. All our systems are at SR10.2 (plus multitudes of patches).

This stuff should be in the reference manuals for the Apollo (and other
vendors too), but it isn't. This was all discovered by scrounging on
other UNIX systems, lots of trial and error on the Apollo, talking to
the Apollo Hotline people, and reading this newsgroup. Enjoy, and please
tell me about any other good stuff you have found!

-----   cut here   -----   cut here   -----   cut here   -----











                      DOMAIN/OS UNIX "DOT" FILES


                             Mike Peterson

                        Department of Chemistry
                         University of Toronto
                           80 St. George St.
                   Toronto, Ontario, Canada  M5S 1A1

                    system@alchemy.chem.utoronto.ca








































   UNIX dot files               - 1 -               January 7, 1991





                             Introduction


   The UNIX "dot" files are essential for creating  and  maintaining
   the  environment  each  user wants to have whenever they login to
   the system.  In our  department,  default  versions  of  all  the
   necessary  and  useful  "dot"  files are automatically created in
   each user's home  directory  as  part  of  the  account  creation
   script.  They  may then modify the files to their heart's content
   (at their own risk!).

   Normally you can not see the special files used by many Unix pro-
   grams,  as they all start with a '.'. However, the ls '-a' option
   will display them for you.

   Here is a quick overview of the files that are "required"  for  a
   BSD UNIX C shell user of X Windows:

   '.cshrc': executed for every C shell the user runs.

   '.login': executed for every C shell login.

   '.logout': executed when the user logs out from a C shell.

   '.mailrc': customizations for electronic mail.

   '.mwmrc': customizations for X Windows 'mwm' window manager.

   '.uwmrc': customizations for X Windows 'uwm' window manager.

   '.Xresources': customizations for X Windows "clients".

   '.xinitrc': executed to start X Windows "clients".

   '.xmodmaprc': customizations for the X Windows keyboard.

   '.xserverrc': executed to start X Windows Apollo "server".

   In addition, this file is  "required"  for  a  Bourne/Korn  shell
   user:

   '.profile': executed for every Bourne/Korn shell login.

   While not strictly a "dot" file, this file is also supplied, both
   to  serve  as a template for user customization and to get around
   severe bugs in Apollo's version of 'make':

   'Makefile': used by 'make'.

   Note that '.cshrc', '.login' and '.profile' actually "source" (or
   call)  master  files  to  do most of their work.  If a user elim-
   inates the "source" statement that calls the master  files,  they
   will  not  automatically  get  their environment updated when the
   master files are changed.






   UNIX dot files               - 2 -               January 7, 1991





                                .cshrc


   By default, the user's .cshrc file is set to:

    1 #
    2 # .cshrc file - run for every C shell started.
    3 # Version: 1990/10/14.
    4 #
    5 # Do the /usr/local/Master.cshrc file stuff first.
    6 # Look there first to see what is being set automatically
    7 # before making lots of additions here.
    8 #
    9 source /usr/local/Master.cshrc
   10 #
   11 # Optional (user-selectable) parameters - remove the '#' to
      activate.
   12 #
   13 #set noclobber               # activate to avoid overwriting files
   14 #alias rm rm -i              # activate to confirm each file
      deletion
   15 #setenv LIBDIR ~/lib # set user-supplied library directory
   16 #
   17 # Set the environment variables necessary for running Gaussian88.
   18 # Remove the '#' from the 'if ... endif' block to activate.
   19 #
   20 #if (-f /g88/setup_g88.csh) then
   21 #   source /g88/setup_g88.csh
   22 #endif

   The '/usr/local/Master.cshrc' file contains:

     1 #
     2 # Master.cshrc file - run for every C shell started.
     3 # Version: 1990/12/17.
     4 #
     5 # Set default path.
     6 #
     7 set path = (/usr/ucb /bin /usr/bin /usr/bin/X11 /usr/local/bin
       /usr/apollo/bin /etc ~/bin)
     8 set host = `hostname`
     9 #
    10 # Add /ws/tapeat/stubs to start of default path on alchemy only.
    11 #
    12 if ($host == alchemy) then
    13    set path = (/ws/tapeat/stubs $path)
    14 endif
    15 #
    16 # Enable access to the Cray Remote Satellite Software for Unix
    17 # systems for alchemy only.
    18 #
    19 if ($host == alchemy) then
    20    if (-e //alchemy/u0/craystn/cls_ux.csh) then
    21       source //alchemy/u0/craystn/cls_ux.csh
    22    endif
    23 endif
    24 #



   UNIX dot files               - 3 -               January 7, 1991





                                .cshrc


    25 # Put the current directory last.
    26 #
    27 set path = ($path .)
    28 #
    29 # Set default directory search path.
    30 #
    31 set cdpath = (. .. $HOME)
    32 #
    33 # Prompt generator.
    34 #
    35 if ($?prompt) then
    36    alias prompt 'set noglob;\
    37    set prompt = `dirs`;\
    38    set prompt = "${host}:${prompt[1]}> ";\
    39    unset noglob'
    40    alias popd 'popd *; prompt'
    41    alias pushd 'pushd *; prompt'
    42    alias cd 'cd *; prompt'
    43    prompt           # make it appear as the first prompt
    44 endif
    45 #
    46 # Set the default floating point option $FLOAT based on the node
       type
    47 # and node name.
    48 #
    49 if ($NODETYPE == DN10000) then
    50    setenv FLOAT '-A cpu,a88k'
    51 else if ($host == todah) then
    52    setenv FLOAT '-A cpu,fpa1 -W0,-frnd'
    53 else
    54    setenv FLOAT '-A cpu,3000 -W0,-frnd'
    55 endif
    56 #
    57 # Set the default printer name.
    58 #
    59 setenv PRINTER 'imagen'
    60 #
    61 # Set the default X Windows server name.
    62 #
    63 setenv DISPLAY "${host}:0"
    64 #
    65 # man paging program default (user-selectable).
    66 #
    67 if (-f /usr/local/bin/less) then
    68    setenv PAGER '/usr/local/bin/less'
    69 endif
    70 #
    71 # vi default options (user-selectable).
    72 #
    73 setenv EDITOR '/usr/ucb/vi'
    74 setenv VISUAL '/usr/ucb/vi'
    75 setenv EXINIT 'set ts=8 sw=8 autoindent redraw ignorecase wm=8'
    76 #
    77 # User-modifiable parameters:



   UNIX dot files               - 4 -               January 7, 1991





                                .cshrc


    78 # Users may change values of these parameters by re-issuing a "set
       ..."
    79 # with the desired value, or "unset ..." to clear a "set"
       completely.
    80 #
    81 set history = 100   # number of commands kept in history buffer
    82 set ignoreeof       # activate to prevent logout by ^D
    83 set notify          # activate for immediate job completion
       notification
    84 umask 022           # file protection mask: owner:rwx group:r-x
       other:r-x
    85 alias h history     # allow 'h' for 'history'
    86 alias pd pushd      # allow 'pd' for 'pushd'
    87 setenv MORE -cds    # default options for 'more'
    88 if ("`tty`" != "/dev/display") then
    89    alias page less  # normally make 'page' default to 'less'
    90 else
    91    alias page vt100 less    # for Apollo displays, make 'page'
       default to 'vt100 less'
    92    alias less vt100 less    # for Apollo displays, make 'less'
       default to 'vt100 less'
    93    alias more vt100 more    # for Apollo displays, make 'more'
       default to 'vt100 more' (temp bug fix)
    94    alias vi vt100 vi        # for Apollo displays, make 'vi'
       default to 'vt100 vi' (temp bug fix)
    95 endif
    96 setenv LESS '-ceMqsPM?f%f .?n?m(file %i of %m) ..?ltline %lt :byte
       %bB?s/%s ..?e(END) ?x- Next %x.:?pB%pB..%t [h for help]'
       # default 'less' options
    97 alias dviimp dviimp -b      # make dviimp print TeX/LaTeX in
       proper page order
    98 #
    99 # Useful stuff for X Windows:
   100 #
   101 # Use 'newsize' after re-sizing an xterm window.
   102 # Use 'seltek' to convert an xterm from vt102 to Tektronix mode.
   103 # Use 'selvt' to convert an xterm from Tektronix to vt102 mode.
   104 # Use 'LO' to logout from an Apollo display.
   105 # Set "tandem" and "tostop" modes for xterms (in case ~/.login
       not read).
   106 #
   107 if ("$term" == "xterm") then
   108   alias newsize 'set noglob; eval `/usr/bin/X11/resize`; unset
       noglob'
   109   alias seltek '(echo -n "E[?38h" | tr E \033)'     # temp bug fix
   110   alias selvt '(echo -n "EC" | tr EC \033\003)'     # temp bug fix
   111   alias LO 'dmwin xdmc lo'
   112   stty tandem tostop
   113 endif
   114 #
   115 # USENET news stuff - note that Apollo uses $ORGANIZATION as
       part of
   116 # their person.group.organization, but the following redefinition
       for



   UNIX dot files               - 5 -               January 7, 1991





                                .cshrc


   117 # news seems to cause no trouble.
   118 #
   119 setenv ORGANIZATION "University of Toronto Chemistry Department"
   120 setenv RNINIT "-e -m -S -/" # default options for rn.

   Line 7: '.' is near the end of the path to avoid  Trojan  Horses;
   '~/bin' puts each users private 'bin' directory on their path.

   Lines 32-44: put current directory into the prompt.

   Lines 45-55: set proper floating point environment  variable  for
   each node (used by the 'Makefile').

   Lines 109-110: run in a subshell since C shell built-in  commands
   fail in pipelines as of SR10.2/SR10.2.p.










































   UNIX dot files               - 6 -               January 7, 1991





                                .login


   By default, the user's .login file is set to:

     1 #
     2 # .login file - run for every C shell interactive login.
     3 # Version: 1988/11/25.
     4 #
     5 # Do the /usr/local/Master.login file stuff first.
     6 # Look there first to see what is being set automatically
     7 # before making lots of additions here.
     8 #
     9 # Set terminal type - the user may insert their favorite terminal
       type
    10 # on the line after 'set favterm ='.
    11 #
    12 set favterm = 914
    13 source /usr/local/Master.login
    14 unset favterm
    15 #
    16 # Optional (user-selectable) parameters and commands.
    17 #
    18 uptime

   The '/usr/local/Master.login' file contains:

     1 #
     2 # Master.login file - run for every C shell interactive login.
     3 # Version: 1990/05/12.
     4 #
     5 # This script is used with an optional variable 'favterm' which is
       the
     6 # users favorite terminal type (assume 'vt100' if not given).
     7 #
     8 if ("$?favterm" == "0") set favterm = vt100
     9 #
    10 # Set terminal characteristics - change rprnt from ^R to ^_ to
       allow
    11 # redraw in vi.
    12 # Also set the speed to 9600 since telnetd doesn't get the proper
       speed.
    13 # Only do this for pseudo-tty's to avoid lots of problems.
    14 #
    15 stty -tabs erase ^H kill ^U intr ^C rprnt ^_ crt tostop rows 0
       columns 0
    16 set device = "`tty`"
    17 egrep -s 'ttyp|ttyq|ttyr|ttys' <<EOF
    18 $device
    19 EOF
    20 if ( "$status" == "0" ) then
    21    stty 9600
    22 endif
    23 unset device
    24 #
    25 # Set terminal type and get $TERMCAP.
    26 # An extra 'stty -tabs' is required due to a problem in tset.



   UNIX dot files               - 7 -               January 7, 1991





                                .login


    27 # Ignore all this stuff for an Apollo display.
    28 # Handle xterms specially (force the proper window size).
    29 #
    30 if ("$term" != "apollo" && "$term" != "apollo_1280_color" &&
       "$term" != "apollo_15_color") then
    31    set noglob
    32    if ("$term" == "su") set term = $favterm
    33    set term = (`tset -Q -I -S ?$term`)
    34    setenv TERMCAP $term[2]
    35    set term = $term[1]
    36    stty -tabs
    37    unset noglob
    38    if ("$term" == "xterm") then
    39       if (-f /usr/bin/X11/resize) then
    40      set noglob
    41      eval `/usr/bin/X11/resize`
    42      unset noglob
    43       else
    44      echo "*** Trouble: no X11 'resize' for xterm  - setting 24/80
       ***"
    45      stty rows 24 columns 80
    46       endif
    47    endif
    48 endif
    49 #
    50 # Check to see if a system save is in progress on either this node
       or
    51 # the users "home" node - if so, ask the user if they really want
       to login.
    52 #
    53 if (-e /usr/local/SAVEINPROGRESS) then
    54    echo " "
    55    echo "******************************************"
    56    echo "A system save is in progress on this node."
    57    echo "******************************************"
    58    echo " "
    59    echo -n "Do you really want to login (reply 'y'<CR> if yes) ? "
    60    set response = $<
    61    echo " "
    62    if ("$response" != "y") then
    63       echo "Congratulations on an excellent choice \!\!\!"
    64       sleep 2
    65       logout
    66    endif
    67    echo "Login permitted, but I hope you don't regret your choice
       \!\!\!"
    68    echo " "
    69    unset response
    70 else if ("$HOME" != "/") then
    71    if (-e $HOME/../../usr/local/SAVEINPROGRESS) then
    72       echo " "
    73       echo "***********************************************"
    74       echo "A system save is in progress on your home node."
    75       echo "***********************************************"



   UNIX dot files               - 8 -               January 7, 1991





                                .login


    76       echo " "
    77       echo -n "Do you really want to login (reply 'y'<CR> if yes)
       ? "
    78       set response = $<
    79       echo " "
    80       if ("$response" != "y") then
    81          echo "Congratulations on an excellent choice \!\!\!"
    82          sleep 2
    83          logout
    84       endif
    85       echo "Login permitted, but I hope you don't regret your
       choice \!\!\!"
    86       echo " "
    87       unset response
    88    endif
    89 endif
    90 #
    91 # Other useful stuff.
    92 #
    93 mesg y
    94 msgs -f
    95 #
    96 # Optional (user-selectable) parameters and commands.
    97 #
    98 biff y
    99 set mail=(60 /usr/spool/mail/$USER)
   100 cd

   Lines 16-23: set speed to 9600 and window size for  telnet/rlogin
   sessions that don't propagate either properly (Apollo bug).

   Lines 30-48: get users terminal  type,  set  TERMCAP  environment
   variable  for faster startup of screen-oriented programs, and set
   proper window size for 'xterm' rlogins.

   Lines 53-89: warn the user if a user-file backup is  in  progress
   on either the login node or their home directory node.




















   UNIX dot files               - 9 -               January 7, 1991





                                .logout


   By default, the user's .logout file is set to:

    1 #
    2 # .logout file - run for every C shell interactive logout.
    3 # Version: 1988/09/07.
    4 #
    5 # Optional (user-selectable) parameters and commands.
    6 #
    7 clear
    8 /usr/games/fortune
    9 echo " "
   10 date













































   UNIX dot files               - 10 -              January 7, 1991





                                .mailrc


   By default, the user's .mailrc file is set to:

    1 #
    2 # .mailrc file - user configuration file for mail.
    3 # Version: 1988/09/06.
    4 #
    5 # Optional (user-selectable) parameters and commands.
    6 #
    7 # Add mail aliases here, for example:
    8 # alias myfriends tom dick harry sally@spot.physics
    9 #

   The '/usr/lib/Mail.rc' file contains:

    1 #
    2 # Mail.rc file - system-wide configuration file for mail.
    3 # Version: 1989/10/06.
    4 #
    5 set EDITOR=/usr/ucb/ex
    6 set PAGER=/usr/local/bin/less
    7 set SHELL=/bin/csh
    8 set VISUAL=/usr/ucb/vi
    9 set append
   10 set ask
   11 set askcc
   12 set autoprint
   13 set crt=20
   14 set folder=MAIL
   15 set metoo
   16 ignore apparently-to errors-to id in-reply-to \
   17      message-id precedence received references remailed-date \
   18      remailed-from sent-by status via

























   UNIX dot files               - 11 -              January 7, 1991





                               .profile


   By default, the user's .profile file is set to:

    1 #
    2 # .profile file - run for every Bourne shell started.
    3 # Version: 1989/12/19.
    4 #
    5 # Do the /usr/local/Master.profile file stuff first.
    6 # Look there first to see what is being set automatically
    7 # before making lots of additions here.
    8 #
    9 # Set terminal type - the user may insert their favorite terminal
      type
   10 # on the line after 'favterm='.
   11 #
   12 favterm=914
   13 . /usr/local/Master.profile
   14 #
   15 # Optional (user-selectable) parameters - remove the '#' to
      activate.
   16 #
   17 #LIBDIR="$HOME/lib"  # set user-supplied library directory
   18 #export LIBDIR               # pass LIBDIR to subsequent shells
   19 #
   20 # Put all the Korn shell stuff here, even if it should logically
   21 # go with other stuff above.
   22 #
   23 if [ "$SHELL" = "/bin/ksh" ]; then
   24 #  alias -x rm="rm -i"       # activate to confirm each file
      deletion
   25 fi
   26 #
   27 # Set the environment variables necessary for running Gaussian88.
   28 # Remove the '#' from the 'if ... fi' block to activate.
   29 #
   30 #if [ -f /g88/setup_g88.sh ]; then
   31 #   . /g88/setup_g88.sh
   32 #fi
   33 #
   34 # Optional (user-selectable) parameters and commands.
   35 #
   36 uptime

   Lines 19-25: if the current shell is the Korn  shell,  allow  the
   user to put aliases here.

   The '/usr/local/Master.profile' file contains:

     1 #
     2 # Master.profile file - run for every Bourne shell login started.
     3 # Version: 1990/12/17.
     4 #
     5 # Set default path.
     6 #
     7 PATH="/usr/ucb:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:



   UNIX dot files               - 12 -              January 7, 1991





                               .profile


       /usr/apollo/bin:/etc:$HOME/bin"
     8 host=`hostname`
     9 #
    10 # Add /ws/tapeat/stubs to start of default path on alchemy only.
    11 #
    12 if [ "$host" = "alchemy" ]; then
    13    PATH="/ws/tapeat/stubs:$PATH"
    14 fi
    15 #
    16 # Enable access to the Cray Remote Satellite Software for Unix
    17 # systems for alchemy only.
    18 #
    19 if [ $host = "alchemy" ]; then
    20    if [ -f //alchemy/u0/craystn/cls_ux.sh ]; then
    21       . //alchemy/u0/craystn/cls_ux.sh
    22    fi
    23 fi
    24 #
    25 # Put the current directory last.
    26 #
    27 PATH="$PATH:."
    28 export PATH
    29 #
    30 MAIL=/usr/mail/$USER
    31 export MAIL
    32 #
    33 # Prompt generator.
    34 #
    35 PS1="${host}"
    36 PS2="> "
    37 export PS1 PS2
    38 #
    39 # Set the default floating point option $FLOAT based on the node
       type
    40 # and node name.
    41 #
    42 if [ $NODETYPE = "DN10000" ]; then
    43    FLOAT='-A cpu,a88k'
    44 elif [ $host = todah ]; then
    45    FLOAT='-A cpu,fpa1 -W0,-frnd'
    46 else
    47    FLOAT='-A cpu,3000 -W0,-frnd'
    48 fi
    49 export FLOAT
    50 #
    51 # Set default printer name.
    52 #
    53 PRINTER='imagen'
    54 export PRINTER
    55 #
    56 # Set the default X Windows server name.
    57 #
    58 DISPLAY=${host}:0
    59 export DISPLAY



   UNIX dot files               - 13 -              January 7, 1991





                               .profile


    60 #
    61 # User-modifiable parameters:
    62 #
    63 umask 022   # file protection mask: owner:rwx group:r-x other:r-x
    64 #
    65 # This script is used with an optional variable 'favterm' which
       is the
    66 # users favorite terminal type (assume '914' if not given).
    67 #
    68 favterm="${favterm=914}"
    69 #
    70 # Set terminal characteristics - change rprnt from ^R to ^_ to
       allow
    71 # redraw in vi.
    72 # Also set the speed to 9600 since telnetd doesn't get the proper
       speed.
    73 # Only do this for pseudo-tty's to avoid lots of trouble.
    74 #
    75 stty -tabs erase H kill U intr C rprnt _ crt tostop rows 0
       columns 0
    76 device="`tty`"
    77 egrep -s 'ttyp|ttyq|ttyr|ttys' <<EOF
    78 $device
    79 EOF
    80 if [ "$?" = "0" ]; then
    81    stty 9600
    82 fi
    83 #
    84 # Set terminal type and get $TERMCAP.
    85 # An extra 'stty -tabs' is required due to a problem in tset.
    86 #
    87 if [ "$TERM" != "apollo" -a "$TERM" != "apollo_1280_color" -a
       "$TERM" != "apollo_15_color" ]; then
    88    if [ "$TERM" = "su" ]; then
    89       TERM="$favterm"
    90    fi
    91    eval `tset -Q -I -S ?$TERM`
    92    stty -tabs
    93 fi
    94 #
    95 # Check to see if a system save is in progress on either the
       users "home"
    96 # node or this node - if so, ask the user if they really want to
       login.
    97 #
    98 if [ -f /usr/local/SAVEINPROGRESS ]; then
    99    echo " "
   100    echo "******************************************"
   101    echo "A system save is in progress on this node."
   102    echo "******************************************"
   103    echo " "
   104    echo -n "Do you really want to login (reply 'y'<CR> if yes) ? "
   105    read response
   106    echo " "



   UNIX dot files               - 14 -              January 7, 1991





                               .profile


   107    if [ "$response" != "y" ]; then
   108       echo "Congratulations on an excellent choice !!!"
   109       sleep 2
   110       logout
   111    fi
   112    echo "Login permitted, but I hope you don't regret your choice
       !!!"
   113    echo " "
   114 elif [ "$HOME" != "/" ]; then
   115    if [ -f $HOME/../../usr/local/SAVEINPROGRESS ]; then
   116       echo " "
   117       echo "***********************************************"
   118       echo "A system save is in progress on your home node."
   119       echo "***********************************************"
   120       echo " "
   121       echo -n "Do you really want to login (reply 'y'<CR> if yes)
       ? "
   122       read response
   123       echo " "
   124       if [ "$response" != "y" ]; then
   125          echo "Congratulations on an excellent choice !!!"
   126          sleep 2
   127          logout
   128       fi
   129       echo "Login permitted, but I hope you don't regret your
       choice !!!"
   130       echo " "
   131    fi
   132 fi
   133 #
   134 # man paging program default (user-selectable).
   135 #
   136 if [ -f /usr/local/bin/less ]; then
   137    PAGER='/usr/local/bin/less'
   138    export PAGER
   139 fi
   140 #
   141 # vi default options (user-selectable).
   142 #
   143 EDITOR='/usr/ucb/vi'
   144 VISUAL='/usr/ucb/vi'
   145 EXINIT='set ts=8 sw=8 autoindent redraw ignorecase wm=8'
   146 export EDITOR VISUAL EXINIT
   147 #
   148 # Other useful stuff.
   149 #
   150 mesg y
   151 msgs -f
   152 #
   153 # Optional (user-selectable) parameters and commands.
   154 #
   155 biff y
   156 MORE='-cds'
   157 export MORE



   UNIX dot files               - 15 -              January 7, 1991





                               .profile


   158 LESS='-ceMqsPM?f%f .?n?m(file %i of %m) ..?ltline %lt :byte
       %bB?s/%s ..?e(END) ?x- Next %x.:?pB%pB..%t [h for help]'
   159 export LESS
   160 #
   161 # USENET news stuff - note that Apollo uses $ORGANIZATION as
       part of
   162 # their person.group.organization, but the following redefinition
       for
   163 # news seems to cause no trouble.
   164 #
   165 ORGANIZATION='University of Toronto Chemistry Department'
   166 RNINIT='-e -m -S -/'        # default options for rn.
   167 export ORGANIZATION RNINIT
   168 #
   169 # Put all the Korn shell stuff here, even if it should logically
   170 # go with other stuff above.
   171 #
   172 if [ "$SHELL" = "/bin/ksh" ]; then
   173 #
   174 #  Set default directory search path.
   175 #
   176    CDPATH=".:..:$HOME"
   177    export CDPATH
   178 #
   179 #  Prompt generator.
   180 #
   181    PS1=${host}:'${PWD}'
   182    export PS1
   183 #
   184 #  Set default history editor.
   185 #
   186    set vi
   187    FCEDIT=/usr/ucb/vi
   188    export FCEDIT
   189 #
   190 #  Mail parameters.
   191 #
   192    MAILCHECK=60                     # check mail every 60 seconds
   193    MAILPATH=/usr/spool/mail/${USER}
   194    export MAILCHECK MAILPATH
   195 #
   196 #  User-modifiable parameters:
   197 #  Users may change values of these parameters by re-issuing a
       "set ..."
   198 #  with the desired value, or "unset ..." to clear a "set"
       completely.
   199 #
   200    HISTSIZE=100             # number of commands kept in history
       buffer
   201    export HISTSIZE
   202    set ignoreeof            # activate to prevent logout by ^D
   203    alias -x h="fc -l"       # allow 'h' for 'history'
   204    alias -x page=less       # normally make 'page' default to
       'less'



   UNIX dot files               - 16 -              January 7, 1991





                               .profile


   205    alias -x dviimp="dviimp -b"      # make dviimp print TeX/LaTeX
       in proper page order
   206 #
   207 #  Useful stuff for X Windows:
   208 #
   209 #  Use 'newsize' after re-sizing an xterm window.
   210 #  Use 'seltek' to convert an xterm from vt102 to Tektronix mode.
   211 #  Use 'selvt' to convert an xterm from Tektronix to vt102 mode.
   212 #  Use 'LO' to logout from an Apollo display.
   213 #  Set "tandem" and "tostop" modes for xterms (in case ~/.login
       not read).
   214 #
   215    if [ "$TERM" = "xterm" ]; then
   216      alias -x newsize='set noglob; eval `/usr/bin/X11/resize`;
       unset noglob'
   217      alias -x seltek='(echo -n "E[?38h" | tr E \033)'
       # temp bug fix
   218      alias -x selvt='(echo -n "EC" | tr EC \033\003)'
       # temp bug fix
   219      alias -x LO='dmwin xdmc lo'
   220      stty tandem tostop
   221    fi
   222 #
   223 #  Execute ~/.logout when the user exits the shell.
   224 #
   225    trap ". $HOME/.logout ; exit" EXIT
   226 fi
   227 #
   228 cd

   These files do as much of the '.cshrc' and '.login' stuff as  can
   be done in a Bourne shell.

   Lines 168-226: Extra stuff for the Korn shell only.























   UNIX dot files               - 17 -              January 7, 1991





                               Makefile


   By default, the user's Makefile file is set to:

    1 #
    2 # Makefile file - used for C and/or Fortran compilations.
    3 # Version: 1990/05/03.
    4 #
    5 # This Makefile expects an environment variable $FLOAT, which
      should
    6 # be set in your ~/.cshrc or ~/.profile file to the appropriate
      string
    7 # to activate any desired floating point options that need to be
      passed
    8 # to the compilers. On the Apollo, the valid possibilities are:
    9 #    $FLOAT = '-A cpu,3000'  - compile for any 680x0-based node.
   10 #    $FLOAT = '-A cpu,fpa1'  - compile for a 680x0+fpa node.
   11 #    $FLOAT = '-A cpu,a88k'  - compile for any PRISM-based node.
   12 # You may want to incorporate the above option into any
      user-written
   13 # Makefiles (via CFLAGS/FFLAGS below) to take maximum advantage
   14 # of the system you use.
   15 #
   16 # Expected naming conventions:
   17 # *.a - archive files.
   18 # *.c - C source files.
   19 # *.e - Efl source files.
   20 # *.f - Fortran source files.
   21 # *.h - Header (include) source files.
   22 # *.l - Lex source files.
   23 # *.o - object files.
   24 # *.r - Ratfor source files.
   25 # *.s - Assembler source files.
   26 # *.y - Yacc-C source files.
   27 # *   - executable files (no suffix).
   28 #
   29 # Set desired default options here:
   30 # $(CFLAGS): C compilation options.
   31 # $(FFLAGS): Fortran compilation options.
   32 # $(PFLAGS): Pascal compilation options.
   33 # $(LFLAGS): Lex options.
   34 # $(MFLAGS): Command line options.
   35 # $(YFLAGS): Yacc options.
   36 # $(LDFLAGS): Loader options.
   37 #
   38 # Activate the following for debugging of your code (add -C to the
   39 # FFLAGS for subscript checking at execution time):
   40 #
   41 CFLAGS = -g $$FLOAT
   42 FFLAGS = -g $$FLOAT
   43 #
   44 # Activate the following for optimization of your code (make sure
   45 # your code works properly with no optimization first):
   46 #
   47 #CFLAGS = -O $$FLOAT
   48 #FFLAGS = -O $$FLOAT



   UNIX dot files               - 18 -              January 7, 1991





                               Makefile


   49 #
   50 # Activate the following for super-optimization of your code (make
      sure
   51 # your code works properly with no optimization first, and don't
      use
   52 # this for code to be put into libraries since the compiler will
      in-line
   53 # your subroutines):
   54 #
   55 #CFLAGS = -W0,'-opt,4' $$FLOAT
   56 #FFLAGS = -W0,'-opt 4' $$FLOAT
   57 #
   58 # You can set ld flags here, or add to the list of libraries (put
      other
   59 # system libraries ahead of -luttcs):
   60 #
   61 LDFLAGS = -luttcs -lutchem
   62 #
   63 # Activate the following line if you have personal libraries, and
      have
   64 # defined the environment variable $LIBDIR to point to the
      directory
   65 # that contains them (e.g. "~/lib"). Put your libraries ahead of
   66 # -luttcs in the form '-lname':
   67 #
   68 #LDFLAGS = -L$$LIBDIR -luttcs -lutchem
   69 #
   70 # Supply correct '.c' rule:
   71 #
   72 .c:
   73      $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
   74 #
   75 # Supply correct '.f' rule:
   76 #
   77 .f:
   78      -f77 $(FFLAGS) $< -o $@ $(LDFLAGS)
   79      -rm -f $*.o
   80 #
   81 # Default action: do nothing.
   82 #
   83 nothing:
   84      @echo "No make target specified - nothing made."
   85      @echo "Usage: make foo"
   86      @echo "or     make 'CFLAGS=... %%FLOAT' foo"
   87      @echo "or     make 'FFLAGS=... %%FLOAT' foo"
   88      @echo "where the '%' are replaced by '$$'."
   89 #
   90 # Clean *.o and core files from the current directory.
   91 # Usage: make clean.
   92 #
   93 clean:
   94      -rm -f *.o core

   Note that the first character of each command line  of  a  "rule"



   UNIX dot files               - 19 -              January 7, 1991





                               Makefile


   after  a "dependency" declaration must start with a <TAB> charac-
   ter, else it will be ignored.

   To avoid using extensions that may mean something  to  some  Unix
   utilities, one possibility is to use:
         foo   < foo.in   >& foo.out   [&]
   as very few Unix utilities use more than 1 character extensions.

   In our department, the Makefile expects an  environment  variable
   "$FLOAT"  to  be set to the appropriate string to compile for the
   floating point option(s) on the system the user  is  LOGGED  INTO
   (NOT the system their files are actually located on !!). They may
   change $FLOAT to compile for another  system  architecture  (e.g.
   compile for the DSP10020 on a DN4500 or vice versa), but they may
   also have to change/set the environment  variable  "$ISP",  which
   has  2 possibilities: "a88k" for the DSP10020, and "m68k" for all
   other systems. Users must make sure  both  the  $FLOAT  and  $ISP
   variables are set correctly for the target system.

   Their Makefile has an option "clean" (invoked  as  "make  clean")
   that will delete all object files in their current working direc-
   tory (i.e. it does a 'rm *.o').

   Note that correct '.c' and '.f' rules are  supplied  to  directly
   compile  C  and FORTRAN source files to executables - the default
   'make'  rules  for  this  are  broken  in  SR10.x  and   SR10.x.p
   (x=0,1,2).






























   UNIX dot files               - 20 -              January 7, 1991





                               .xinitrc


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.xinitrc' file is used:

     1 #! /bin/sh
     2 #
     3 # Master.xinitrc - X Windows client start-up script for Apollo
       systems.
     4 # Version: 1990/11/06.
     5 #
     6 # Normally this is invoked by 'startx &' or 'xinit &', which may
       be
     7 # run automatically at login on the display, or run manually
     8 # from the first login window on the display.
     9 #
    10 # Unless the client returns immediately, all commands should be
    11 # run in the background.
    12 #
    13 # In the following, 'alchemy' is a 1024x800 color DN10000,
    14 # 'aurum' is a 1280x1024 monochrome DN2500,
    15 # 'todah' is a 1024x800 color DN4500,
    16 # 'aqua' and 'terra' are 1280x1024 color DN580s.
    17 #
    18 # Find out what node we are running on.
    19 #
    20 host=`hostname`
    21 #
    22 # Load X default specifications, if any (RECOMMENDED).
    23 #
    24 if [ -r $HOME/.Xresources ]; then
    25   xrdb -load $HOME/.Xresources >/dev/null 2>&1
    26 elif [ -r /usr/local/Master.Xresources ]; then
    27   xrdb -load /usr/local/Master.Xresources >/dev/null 2>&1
    28 fi
    29 #
    30 # Reset the keyboard to clear any previous settings (RECOMMENDED).
    31 #
    32 kbm -r
    33 #
    34 # Set the keyboard so that all keys repeat (OPTIONAL).
    35 #
    36 kbm -A alpha,default
    37 #
    38 # Set the keyboard so that F0 and the Alt keys work as "Meta"
       (RECOMMENDED).
    39 #
    40 if [ -r $HOME/.xmodmaprc ]; then
    41   xmodmap $HOME/.xmodmaprc >/dev/null 2>&1
    42 elif [ -r /usr/local/Master.xmodmaprc ]; then
    43   xmodmap /usr/local/Master.xmodmaprc >/dev/null 2>&1
    44 fi
    45 #
    46 # Add the X11R2 fonts to the font path (OPTIONAL).
    47 #



   UNIX dot files               - 21 -              January 7, 1991





                               .xinitrc


    48 xset fp+ /usr/lib/X11/fonts/oldx11/ >/dev/null 2>&1
    49 #
    50 # Start a window manager (RECOMMENDED).
    51 # Precedence is:
    52 # 1) if $HOME/.mwmrc exists, start mwm.
    53 # 2) if $HOME/.uwmrc exists, start uwm with that configuration
       file.
    54 # 3) if /usr/local/Master.mwmrc exists, start mwm.
    55 # 4) if /usr/local/Master.uwmrc exists, start uwm with that
       configuration file.
    56 # 5) start mwm with no configuration file.
    57 # 6) start uwm with no configuration file.
    58 # 7) give up - hope the user starts one manually.
    59 # In all cases involving mwm, the 'Mwm*configFile' property will
    60 # actually be used to get the name of the configuration file,
    61 # so we will assume that it is set correctly.
    62 #
    63 if [ -r $HOME/.mwmrc -a -r /usr/bin/X11/mwm ]; then
    64   mwm >/dev/null 2>&1 &
    65 elif [ -r $HOME/.uwmrc -a -r /usr/bin/X11/uwm ]; then
    66   uwm -f $HOME/.uwmrc >/dev/null 2>&1 &
    67 elif [ -r /usr/local/Master.mwmrc -a -r /usr/bin/X11/mwm ]; then
    68   mwm >/dev/null 2>&1 &
    69 elif [ -r /usr/local/Master.uwmrc -a -r /usr/bin/X11/uwm ]; then
    70   uwm -f /usr/local/Master.uwmrc >/dev/null 2>&1 &
    71 elif [ -r /usr/bin/X11/mwm ]; then
    72   mwm >/dev/null 2>&1 &
    73 elif [ -r /usr/bin/X11/uwm ]; then
    74   uwm >/dev/null 2>&1 &
    75 fi
    76 #
    77 # Start the clock (OPTIONAL).
    78 #
    79 if [ "$host" != "terra" -a "$host" != "aqua" ]; then
    80   xclock >/dev/null 2>&1 &
    81 fi
    82 #
    83 # Start the mail notifier (OPTIONAL).
    84 #
    85 if [ "$host" != "terra" -a "$host" != "aqua" ]; then
    86   xbiff >/dev/null 2>&1 &
    87 fi
    88 #
    89 # Start the man page viewer (OPTIONAL).
    90 #
    91 if [ "$host" != "terra" -a "$host" != "aqua" ]; then
    92   xman >/dev/null 2>&1 &
    93 fi
    94 #
    95 # Set the root window colour/bitmap (pick one of the following)
       (OPTIONAL).
    96 # Look in '/usr/include/X11/bitmaps' for other possibilities.
    97 # Note: backgrounds with little/no pattern seem better for mwm.
    98 #



   UNIX dot files               - 22 -              January 7, 1991





                               .xinitrc


    99 if [ "$host" != "aurum" ]; then
   100   xsetroot -bitmap /usr/include/X11/bitmaps/gray >/dev/null 2>&1
   101 else
   102   xsetroot -bitmap /usr/include/X11/bitmaps/root_weave >/dev/null
       2>&1
   103 fi
   104 #
   105 # Start the load average display (OPTIONAL).
   106 #
   107 if [ "$host" = "aurum" ]; then
   108   xload >/dev/null 2>&1 &
   109 fi
   110 #
   111 # Start the eyes (OPTIONAL).
   112 #
   113 if [ "$host" = "aurum" ]; then
   114   xeyes >/dev/null 2>&1 &
   115 fi
   116 #
   117 # Start a terminal emulator - simulate a login (RECOMMENDED).
   118 #
   119 if [ "$host" = "alchemy" -o "$host" = "todah" ]; then
   120   xterm -geometry 80x50+0+0 -e /sys/dm/login_sh >/dev/null 2>&1 &
   121 else
   122   xterm -geometry 80x60+0+0 -e /sys/dm/login_sh >/dev/null 2>&1 &
   123 fi
   124 #
   125 # Wait for the clients to finish (CRITICAL).
   126 #
   127 wait
   128 #
   129 exit 0

   In the above, the script checks for an appropriately named confi-
   guration  file  in  the  user's  home  directory  first,  then in
   '/usr/local' for a master copy.

   On certain nodes ('terra' and 'aqua' in the above  are  DN580's),
   only the minimum set of clients is started, since logging in with
   X Windows already takes more than 5 minutes.

















   UNIX dot files               - 23 -              January 7, 1991





                              .xserverrc


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.xserverrc' file is used:

    1 #! /bin/sh
    2 #
    3 # Master.xserverrc - X Windows server start-up script for Apollo
      systems.
    4 # Version: 1990/05/31.
    5 #
    6 # Normally this is invoked by 'startx &' or 'xinit &', which may be
    7 # run automatically at login on the display, or run manually
    8 # from the first login window on the display.
    9 #
   10 # Since the Xapollo server is normally started at boot time,
   11 # just have this script hang forever.
   12 #
   13
   14 while true
   15 do
   16   sleep 360000
   17 done
   18
   19 exit 0

































   UNIX dot files               - 24 -              January 7, 1991





                              .Xresources


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.Xresources' file is used:

     1 !
     2 ! Master.Xresources - X Windows xrdb configuration file for Apollo
       systems.
     3 ! Version: 1990/12/14.
     4 !
     5 ! Set default font depending on the display tupe.
     6 !
     7 #if (defined COLOR && WIDTH == 1280)
     8 #define DEFAULT_FONT        *-courier-bold-r*-140-*
     9 #define DEFAULT_BOLDFONT    *-courier-medium-r*-140-*
    10 #else
    11 #define DEFAULT_FONT                9x15
    12 #define DEFAULT_BOLDFONT    9x15
    13 #endif
    14 !
    15 ! Template for xrdb resources definitions:
    16 !
    17 ! Set x? characteristics:
    18 !
    19 !X?*Geometry:  100x100+0+0
    20 !#ifdef COLOR
    21 !X?*Background:  White
    22 !X?*Foreground:  Black
    23 !X?*BorderColor:  Blue
    24 !#endif
    25 !X?*borderWidth:  2
    26 !
    27 ! Set xbiff characteristics:
    28 !
    29 #if (WIDTH == 1280)
    30 XBiff*Geometry:  90x90-240+0
    31 #else
    32 XBiff*Geometry:  90x90-0+240
    33 #endif
    34 #ifdef COLOR
    35 XBiff*Background:  Black
    36 XBiff*Foreground:  Red
    37 XBiff*BorderColor:  White
    38 #endif
    39 XBiff*borderWidth:  2
    40 !
    41 ! Set xcalc characteristics:
    42 !
    43 #ifdef COLOR
    44 xcalc*Background:  Aquamarine
    45 xcalc*Foreground:  Black
    46 xcalc*NKeyBack:  White
    47 xcalc*NKeyFore:  Black
    48 xcalc*OKeyBack:  PaleGreen
    49 xcalc*OKeyFore:  Black



   UNIX dot files               - 25 -              January 7, 1991





                              .Xresources


    50 xcalc*FKeyBack:  GoldenRod
    51 xcalc*FKeyFore:  Black
    52 xcalc*DispBack:  Cyan
    53 xcalc*DispFore:  Black
    54 xcalc*IconBack:  White
    55 xcalc*IconFore:  Red
    56 xcalc*BorderColor:  Blue
    57 #endif
    58 xcalc*borderWidth:  2
    59 !
    60 ! Set xclock characteristics:
    61 !
    62 #if (WIDTH == 1280)
    63 XClock*Geometry:  200x200-0+0
    64 #else
    65 XClock*Geometry:  200x200-0+0
    66 #endif
    67 #ifdef COLOR
    68 XClock*Background:  Turquoise
    69 XClock*Foreground:  Black
    70 XClock*BorderColor:  White
    71 #endif
    72 XClock*borderWidth:  2
    73 XClock*analog:  on
    74 XClock*chime:  on
    75 XClock*padding:  2
    76 !
    77 ! Set xeyes characteristics:
    78 !
    79 #if (WIDTH == 1280)
    80 XEyes*Geometry:  150x100-360+0
    81 #else
    82 XEyes*Geometry:  150x100-0+375
    83 #endif
    84 #ifdef COLOR
    85 XEyes*Background:  Black
    86 XEyes*Foreground:  Yellow
    87 XEyes*BorderColor:  White
    88 #endif
    89 XEyes*borderWidth:  2
    90 !
    91 ! Set xload characteristics:
    92 !
    93 #if (WIDTH == 1280)
    94 XLoad*Geometry:  400x120-0+300
    95 #else
    96 XLoad*Geometry:  250x100-0+520
    97 #endif
    98 #ifdef COLOR
    99 XLoad*Background:  Black
   100 XLoad*Foreground:  Red
   101 XLoad*BorderColor:  White
   102 XLoad*highlight:  White
   103 #endif



   UNIX dot files               - 26 -              January 7, 1991





                              .Xresources


   104 XLoad*borderWidth:  2
   105 XLoad*Font:  DEFAULT_FONT
   106 !
   107 ! Set xmag characteristics:
   108 !
   109 #ifdef COLOR
   110 XMag*Background:  Black
   111 XMag*Foreground:  Red
   112 XMag*BorderColor:  White
   113 #endif
   114 XMag*borderWidth:  2
   115 !
   116 ! Set xman characteristics:
   117 !
   118 #if (WIDTH == 1280)
   119 XMan*topBox.Geometry:  105x100-250+150
   120 XMan*help.Geometry:  800x900+0+0
   121 XMan*manualBrowser.Geometry:  800x900+0+0
   122 XMan*directoryHeight:  200
   123 #else
   124 XMan*topBox.Geometry:  105x100-0+665
   125 XMan*help.Geometry:  800x700+0+0
   126 XMan*manualBrowser.Geometry:  800x700+0+0
   127 XMan*directoryHeight:  150
   128 #endif
   129 #ifdef COLOR
   130 XMan*Background:  White
   131 XMan*Foreground:  Black
   132 XMan*BorderColor:  Blue
   133 #endif
   134 XMan*borderWidth:  2
   135 XMan*bothShown:  true
   136 XMan*directoryFontNormal:  DEFAULT_FONT
   137 XMan*manualFontNormal:  DEFAULT_FONT
   138 !
   139 ! Set xtalk characteristics:
   140 !
   141 #ifdef COLOR
   142 Xtalk*Background:  White
   143 Xtalk*Foreground:  Black
   144 Xtalk*BorderColor:  Blue
   145 #endif
   146 Xtalk*borderWidth:  2
   147 Xtalk*Font:  DEFAULT_FONT
   148 !
   149 ! Set xterm characteristics:
   150 !
   151 #ifdef COLOR
   152 XTerm*Background:  White
   153 XTerm*Foreground:  Black
   154 XTerm*BorderColor:  Blue
   155 XTerm*cursorColor:  Red
   156 #endif
   157 XTerm*borderWidth:  5



   UNIX dot files               - 27 -              January 7, 1991





                              .Xresources


   158 XTerm*Font:  DEFAULT_FONT
   159 XTerm*boldFont:  DEFAULT_BOLDFONT
   160 XTerm*charClass:  33:48,37:48,45-47:48,64:48
   161 XTerm*curses:  on
   162 XTerm*cutNewline:  off
   163 XTerm*cutToBeginningOfLine:  off
   164 XTerm*jumpScroll:  on
   165 XTerm*multiClickTime:  500
   166 XTerm*multiScroll:  on
   167 XTerm*reverseWrap:  on
   168 XTerm*saveLines:  1000
   169 XTerm*scrollBar:  on
   170 XTerm*scrollbar*thickness:  15
   171 XTerm*titeInhibit:  on
   172 XTerm*ttyModes:  erase ^H rprnt ^_
   173 XTerm*utmpInhibit:  on
   174 !
   175 ! Set bitmap characteristics:
   176 !
   177 bitmap*Geometry:  600x600+0+0
   178 #ifdef COLOR
   179 bitmap*Background:  White
   180 bitmap*Foreground:  Black
   181 bitmap*BorderColor:  Black
   182 #endif
   183 bitmap*borderWidth:  2
   184 bitmap*Dashed:  off
   185 !
   186 ! Set emacs characteristics:
   187 !
   188 #if (WIDTH == 1280)
   189 emacs*Geometry:  80x60-0-0
   190 #else
   191 emacs*Geometry:  80x50-0-0
   192 #endif
   193 #ifdef COLOR
   194 emacs*Background:  White
   195 emacs*Foreground:  Black
   196 emacs*BorderColor:  Red
   197 emacs*Cursor:  Red
   198 #endif
   199 emacs*borderWidth:  2
   200 emacs*Font:  DEFAULT_FONT
   201 !
   202 ! Set mwm characteristics:
   203 !
   204 #ifdef COLOR
   205 Mwm*background:  #7c8498
   206 Mwm*foreground:  #fce089
   207 Mwm*activeBackground:  #9db5cd
   208 Mwm*activeForeground:  #ffff00
   209 Mwm*menu*background:  #d4d8e8
   210 Mwm*menu*foreground:  black
   211 !Mwm*activeTopShadowColor:  lightgrey



   UNIX dot files               - 28 -              January 7, 1991





                              .Xresources


   212 !Mwm*activeBottomShadowColor:  grey
   213 #else
   214 Mwm*background:  white
   215 Mwm*foreground:  black
   216 Mwm*activeBackground:  black
   217 Mwm*activeForeground:  white
   218 Mwm*menu*background:  white
   219 Mwm*menu*foreground:  black
   220 #endif
   221 Mwm*buttonBindings:  DefaultButtonBindings
   222 Mwm*keyBindings:  DefaultKeyBindings
   223 Mwm*windowMenu:  DefaultWindowMenu
   224 ! Use either /usr/local/Master.mwmrc, .mwmrc, or nothing.
   225 Mwm*configFile:  /usr/local/Master.mwmrc
   226 Mwm*fontList:  variable
   227 Mwm*icon*fontList:  fixed
   228 Mwm*clientAutoPlace:  true
   229 Mwm*moveThreshold:  3
   230 Mwm*resizeBorderWidth:  7
   231 Mwm*useIconBox:  false
   232 ! Use either:
   233 ! explicit keyboardFocusPolicy with focusAutoRaise true/false
       (your preference),
   234 ! or
   235 ! pointer keyboardFocusPolicy with focusAutoRaise false.
   236 Mwm*keyboardFocusPolicy:  explicit
   237 Mwm*focusAutoRaise:  true
   238 ! Apollo-isms to avoid window decorations around the DM command
       line windows.
   239 !Mwm*/sys/dm/input.clientDecoration:  none
   240 Mwm*output*clientDecoration:  none
   241 !
   242 ! Set uwm characteristics:
   243 !
   244 #ifdef COLOR
   245 uwm*Background:  #ede7e2
   246 uwm*Foreground:  #f00
   247 uwm*BorderColor:  Black
   248 #endif
   249 uwm*borderWidth:  0
   250 uwm*iborderWidth:  0
   251 uwm*mborderWidth:  1















   UNIX dot files               - 29 -              January 7, 1991





                                .mwmrc


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.mwmrc' file is used:

     1 #
     2 # Master.mwmrc - X Windows mwm configuration script for Apollo
       systems.
     3 # Version: 1990/11/13.
     4 #
     5
     6
     7 #
     8 # menu pane descriptions
     9 #
    10
    11 # Root Menu Description
    12 Menu RootMenu
    13 {
    14     "Root Menu"             f.title
    15     no-label                f.separator
    16     "New Window"    f.exec "xterm &"
    17     "Shuffle Up"    f.circle_up
    18     "Shuffle Down"  f.circle_down
    19     "Refresh"               f.refresh
    20     "Utilities"             f.menu  UtilitiesMenu
    21 #   "Logout"                f.menu  LogoutMenu
    22     no-label                f.separator
    23     "Restart..."    f.restart
    24 }
    25
    26 # Utilities Window Menu Description
    27
    28 Menu UtilitiesMenu
    29 {
    30     "Utilities Menu"        f.title
    31     no-label                f.separator
    32     "xbiff"         f.exec "xbiff &"
    33     "xcalc (TI)"    f.exec "xcalc &"
    34     "xcalc (rpn)"   f.exec "xcalc -rpn &"
    35     "xclock"                f.exec "xclock &"
    36     "xeyes"         f.exec "xeyes &"
    37     "xkill"         f.nop   # was: f.exec "xkill &"
    38     "xless"         f.exec "xless /dev/null &"
    39     "xload"         f.exec "xload &"
    40     "xmag"          f.exec "xmag &"
    41     "xman"          f.exec "xman &"
    42     "xpostit"               f.exec "xpostit &"
    43     "xshowcmap"             f.exec "xshowcmap &"
    44     "xtalk"         f.exec "xtalk &"
    45     "xtetris"               f.exec "xtetris &"
    46     "dmwin"         f.exec "dmwin &"
    47 }
    48
    49 # Logout Window Menu Description



   UNIX dot files               - 30 -              January 7, 1991





                                .mwmrc


    50
    51 Menu LogoutMenu
    52 {
    53     "Logout Menu"   f.title
    54     no-label                f.separator
    55     "Confirm"               f.exec "dmwin xdmc lo"
    56     "Cancel"                f.exec "sleep 1 &"
    57 }
    58
    59 # Default Window Menu Description
    60
    61 Menu DefaultWindowMenu MwmWindowMenu
    62 {
    63     "Restore"       _R      Alt<Key>F5      f.normalize
    64     "Move"  _M      Alt<Key>F7      f.move
    65     "Size"  _S      Alt<Key>F8      f.resize
    66     "Minimize"      _n      Alt<Key>F9      f.minimize
    67     "Maximize"      _x      Alt<Key>F10     f.maximize
    68     "Lower" _L      Alt<Key>F3      f.lower
    69     no-label                                f.separator
    70     "Close" _C      Alt<Key>F4      f.kill
    71 }
    72
    73
    74 #
    75 # key binding descriptions
    76 #
    77
    78 Keys DefaultKeyBindings
    79 {
    80     Shift<Key>Escape            icon|window
       f.post_wmenu
    81     Meta<Key>space              icon|window
       f.post_wmenu
    82     Meta<Key>Tab                root|icon|window        f.next_key
    83     Meta Shift<Key>Tab          root|icon|window        f.prev_key
    84     Meta<Key>Escape             root|icon|window        f.next_key
    85     Meta Shift<Key>Escape       root|icon|window        f.prev_key
    86     Meta Ctrl Shift<Key>exclam  root|icon|window
       f.set_behavior
    87 #    Meta<Key>Down               root|icon|window
       f.circle_down
    88 #    Meta<Key>Up                 root|icon|window
       f.circle_up
    89     Meta<Key>F6                 window                  f.next_key
       transient
    90 }
    91
    92 #
    93 # button binding descriptions
    94 #
    95
    96 Buttons DefaultButtonBindings
    97 {



   UNIX dot files               - 31 -              January 7, 1991





                                .mwmrc


    98     <Btn1Down>          frame|icon      f.raise
    99     <Btn2Down>          frame|icon      f.post_wmenu
   100     <Btn1Down>          root            f.menu  RootMenu
   101     Meta<Btn1Down>  icon|window     f.lower
   102     Meta<Btn2Down>  window|icon     f.resize
   103     Meta<Btn3Down>  window          f.move
   104 }
   105
   106 Buttons ExplicitButtonBindings
   107 {
   108     <Btn1Down>          frame|icon      f.raise
   109     <Btn2Down>          frame|icon      f.post_wmenu
   110     <Btn3Down>          frame|icon      f.lower
   111     <Btn1Down>          root            f.menu  RootMenu
   112     Meta<Btn1Down>  window|icon     f.lower
   113     Meta<Btn2Down>  window|icon     f.resize
   114     Meta<Btn3Down>  window|icon     f.move
   115
   116 }
   117
   118 Buttons PointerButtonBindings
   119 {
   120     <Btn1Down>          frame|icon      f.raise
   121     <Btn2Down>          frame|icon      f.post_wmenu
   122     <Btn3Down>          frame|icon      f.lower
   123     <Btn1Down>          root            f.menu  RootMenu
   124 # If (Mwm*passButtons == False)
   125     Meta<Btn1Down>  window|icon     f.raise
   126 # Else
   127 #    <Btn1Down>          window          f.raise
   128 #    Meta<Btn1Down> window|icon     f.lower
   129     Meta<Btn2Down>  window|icon     f.resize
   130     Meta<Btn3Down>  window|icon     f.move
   131 }
   132
   133 #
   134 #  END OF mwm RESOURCE DESCRIPTION FILE
   135 #



















   UNIX dot files               - 32 -              January 7, 1991





                                .uwmrc


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.uwmrc' file is used:

     1 #
     2 # Master.uwmrc - X Windows uwm configuration script for Apollo
       systems.
     3 # Version: 1990/10/13.
     4 #
     5 # $Source $
     6 # $Author $
     7 # $Header $
     8 # Copyright (c) 1987 by the Massachusetts Institute of Technology.
     9 #
    10 # This is a startup file for uwm that produces an xwm lookalike,
    11 # but adds two useful menus.  It is patterned on the public
    12 # distribution ../lib/X/uwm/jg.uwmrc file by Jim Gettys.
    13 #
    14 resetbindings
    15 resetvariables
    16 resetmenus
    17 #noautoselect
    18 autoselect
    19 delta=5
    20 freeze
    21 grid
    22 zap
    23 pushabsolute
    24 push=1
    25 hiconpad=5
    26 viconpad=5
    27 #hmenupad=3
    28 hmenupad=5
    29 #vmenupad=0
    30 vmenupad=3
    31 #iconfont=fixed
    32 #menufont=fixed
    33 #resizefont=fixed
    34 iconfont=9x15
    35 menufont=9x15
    36 resizefont=9x15
    37 volume=0
    38
    39 # FUNCTION  KEYS    CONTEXT         MOUSE BUTTON ACTIONS
    40 f.newiconify=       meta    :window|icon:   delta left
    41 f.raise=    meta    :window|icon:   delta left
    42 f.lower=    meta    :window|icon:   left up
    43 f.raise=    meta    :window:        middle down
    44 f.resize=   meta    :window:        delta middle
    45 f.iconify=  meta    :icon:          middle up
    46 f.raise=    meta    :window|icon:   right down
    47 f.move=             meta    :window|icon:   delta right
    48 f.circledown=       meta    :root:          left down
    49 f.circleup= meta    :root:          right down



   UNIX dot files               - 33 -              January 7, 1991





                                .uwmrc


    50 f.circledown=       m|s     ::              left down
    51 f.menu=                     :root:          middle down
       : "WindowOps"
    52 f.menu=             m|s     ::              middle down
       : "WindowOps"
    53 f.circleup= m|s     ::              right down
    54 f.menu=                     :root:          left down
       : "Applications"
    55 f.menu=                     :root:          right down
       : "Preferences"
    56 f.iconify=  m|c     :window|icon:   left down
    57 f.newiconify=       m|l     :window|icon:   left down
    58 f.raise=    m|l     :window|icon:   left up
    59 f.pushright=        m|l     :window|icon:   right down
    60 f.pushleft= m|c     :window|icon:   right down
    61 f.pushup=   m|l     :window|icon:   middle down
    62 f.pushdown= m|c     :window|icon:   middle down
    63
    64 menu = "WindowOps" {
    65 New Window: !"xterm & "
    66 RefreshScreen:      f.refresh
    67 Redraw:             f.redraw
    68 Move:               f.move
    69 Resize:             f.resize
    70 Lower:              f.lower
    71 Raise:              f.raise
    72 CircUp:             f.circleup
    73 CircDown:   f.circledown
    74 AutoIconify:        f.iconify
    75 LowerIconify:       f.newiconify
    76 NewIconify: f.newiconify
    77 Focus:              f.focus
    78 Freeze:             f.pause
    79 UnFreeze:   f.continue
    80 Restart:    f.restart
    81 }
    82 menu = "Preferences" {
    83 Bell Loud:  !"xset b 7&"
    84 Bell Normal:        !"xset b 3&"
    85 Bell Off:   !"xset b off&"
    86 Click Loud: !"xset c 8&"
    87 Click Soft: !"xset c on&"
    88 Click Off:  !"xset c off&"
    89 Lock On:    !"xset l on&"
    90 Lock Off:   !"xset l off&"
    91 Mouse Fast: !"xset m 4 2&"
    92 Mouse Normal:       !"xset m 2 5&"
    93 Mouse Slow: !"xset m 1 1&"
    94 }
    95 menu = "Applications" {
    96 xbiff:              !"xbiff &"
    97 "xcalc (TI)":       !"xcalc &"
    98 "xcalc (rpn)":      !"xcalc -rpn &"
    99 xclock:             !"xclock &"



   UNIX dot files               - 34 -              January 7, 1991





                                .uwmrc


   100 xeyes:              !"xeyes &"
   101 xkill:              !"xkill &"
   102 xless"              !"xless /dev/null &"
   103 xload:              !"xload &"
   104 xmag:               !"xmag &"
   105 xman:               !"xman &"
   106 xpostit:    !"xpostit &"
   107 xshowcmap:  !"xshowcmap &"
   108 xtalk:              !"xtalk &"
   109 xtetris:    !"xtetris &"
   110 dmwin:              !"dmwin &"
   111 }

   This is the Apollo-supplied '/usr/X11/lib/uwm/mit.uwmrc'  with  a
   bug  fix  to allow the "Preferences" menu to be popped up, and an
   "Applications" menu added, along with some minor options changes.









































   UNIX dot files               - 35 -              January 7, 1991





                              .xmodmaprc


   This file is not present in each  user's  home  directory  unless
   they     want     to    make    customizations;    instead    the
   '/usr/local/Master.xmodmaprc' file is used:

    1 !
    2 ! Master.xmodmaprc - X Windows xmodmap configuration file for
      Apollo systems.
    3 ! Version: 1990/05/31.
    4 !
    5 ! Remove any definition for Meta
    6 clear Mod1
    7 !
    8 ! "Relabel" key F0 (aka F10) as Meta_L
    9 keycode 0x93 = Meta_L
   10 !
   11 ! Make F0 act as a Meta modifier
   12 add Mod1 = Meta_L
   13 !
   14 ! Make Alt_L and Alt_R act as Meta modifiers
   15 add Mod1 = Alt_L Alt_R





































   UNIX dot files               - 36 -              January 7, 1991





                         Miscellaneous X Stuff


   There are several other files that need modification for "real" X
   Windows operation (i.e. X owns the root window, X starts automat-
   ically at boot time, each users X clients start automatically  at
   login):

   /etc/rc (excerpt only):

   if [ -f /etc/daemons/Xapollo -o -f /etc/daemons/xdm ]; then
           if [ -f /etc/xdm -a -f /etc/daemons/xdm ]; then
                   (echo " xdm\c" >/dev/console)
                   (/etc/xdm) &
           elif [ -f /etc/Xapollo -a -f /etc/daemons/Xapollo ]; then
                   (echo " Xapollo\c" >/dev/console)
                   (nice --10 /etc/Xapollo -D1 s+r+ ) &
                   # (nice --5 /etc/Xapollo -K /usr/X11/lib/keyboard/
   keyboard.config -D1 s+r-) &
           fi
   fi

   and do 'touch /etc/daemons/Xapollo'.

   The        files         '/usr/X11/lib/xinit/xinitrc'         and
   '/usr/X11/lib/xinit/xserverrc' are changed to links:

   lrwxrwxrwx   1 root           25 May 30 15:51
      /usr/X11/lib/xinit/xinitrc -> /usr/local/Master.xinitrc
   lrwxrwxrwx   1 root           27 May 30 15:51
      /usr/X11/lib/xinit/xserverrc -> /usr/local/Master.xserverrc

   since 'startx' and 'xinit' look first in the user's  home  direc-
   tory  for '.xinitrc' and '.xserverrc', then for the 'xinitrc' and
   'xserverrc' files listed.   (Note  that  '/usr/X11/lib/xinit'  is
   really '/sys/node_data/etc/xinit'.)

   The file '/usr/X11/lib/uwm/system.uwmrc' is created as a link:

   lrwxrwxrwx   1 root           23 May 18 12:49
      system.uwmrc -> /usr/local/Master.uwmrc

   since the 'system.uwmrc' file is used  by  default  by  'uwm'  at
   start-up time if no other configuration file is specified.
















   UNIX dot files               - 37 -              January 7, 1991





                         Miscellaneous X Stuff


   The file '/sys/node_data/startup.1280bw' becomes:

    1 # STARTUP, /SYS/DM, default system startup command file for
      1280x1024 monochrome, 11/30/87
    2 #
    3
    4 # Default is black characters on a white (or green) background.
    5 INV -ON
    6
    7 #  Window positions for the DM's input and output windows.
    8 #  Do not comment these out.
    9 (692,1011)dr;(1279,1023)cv /sys/dm/output
   10 (0,1011)dr;(639,1023)cv /sys/dm/input
   11 (640,1011)dr;(692,1023)cv /sys/dm/output;pb
   12
   13
   14 #  The default Apollo compose key is f5. It is normally NOT
      enabled.
   15 #  To enable it, uncomment the following line.
   16 #
   17 #cps /usr/apollo/bin/kbm -c f5
   18 #
   19 #  To change it to a different key, edit the previous line as
      appropriate.
   20 #
   21 #  To disable DM window management, uncomment the following
      command.
   22 #  Ie. Uncomment if running X in X-owns-root mode
   23 #
   24 wmgr -off
   25 #
   26 #  The following sets a default DISPLAY environment for X.
   27 #
   28 env DISPLAY 'aurum:0'

   The file '/sys/dm/startup_login.1280bw' becomes:

    1 # STARTUP_LOGIN   (the per_login startup file in `node_data or
      /sys/dm)
    2
    3 ## main shell whose shape is generally agreeable to users of this
      node
    4 # default shell will be created based on the one specified in
      passwd file
    5
    6 #(0,500)dr;(799,955)cp /sys/dm/login_sh
    7 cpo /bin/csh -c /usr/bin/X11/startx
    8
    9 ## and the users private dm command file from his home directory,
      if desired
   10    cmdf user_data/startup_dm.1280bw






   UNIX dot files               - 38 -              January 7, 1991





                         Miscellaneous X Stuff


   If the user would like the DM I/O windows removed from the bottom
   of   the   screen  automatically,  they  can  make  a  link  from
   '~/user_data/startup_dm.1280bw'  to  '/usr/local/Master.dmiooff';
   the latter file contains:

    1 #
    2 # Master.dmiooff - X Windows DM start-up script for Apollo systems.
    3 # Version: 1990/08/08.
    4 #
    5 # Remove the DM windows from the bottom of an X display.
    6 # You can use the 'LO' alias to logout from the display,
    7 # since the "Command:" window will be hidden.
    8 #
    9 # This script may be read by the DM at login time, and for it to
      work,
   10 # there must be links in the '~/user_data' directory from the
      following
   11 # files to '/usr/local/Master.dmiooff':
   12 #    startup_dm.1280bw         [node aurum]
   13 #    startup_dm.1280color      [nodes aqua terra]
   14 #    startup_dm.19l            [nodes alchemy todah]
   15 #    startup_dm.color          [no Chemistry nodes]
   16 # where you can control to some extent which node(s) will act this
      way
   17 # by selecting which types of systems will be affected.
   18 #
   19 # The links can be made with the command(s):
   20 #    cd  ~/user_data
   21 #    ln  -s  /usr/local/Master.dmiooff  startup_dm.1280bw
   22 #    ln  -s  /usr/local/Master.dmiooff  startup_dm.1280color
   23 #    ln  -s  /usr/local/Master.dmiooff  startup_dm.19l
   24 #    ln  -s  /usr/local/Master.dmiooff  startup_dm.color
   25 # where only the second 'ln' command is needed by most users.
   26 #
   27 dmio -off






















   UNIX dot files               - 39 -              January 7, 1991


-- 
Mike Peterson, System Administrator, U/Toronto Department of Chemistry
E-mail: system@alchemy.chem.utoronto.ca
Tel: (416) 978-7094                  Fax: (416) 978-8775