dot files - no more responses please - Summary

Stephen Riehm [Romulis] s887212 at minyos.xx.rmit.oz.au
Thu Nov 22 13:15:54 AEST 1990


OK.. I can see that I have opened a pandora's can of snakes with this
request. I have received a lot of mail... thank you to all who did reply.
<<was amazing how many people told me all about the files that I said I
knew about.. oh well>>

what follows is a brief summary of the files which came to my attention..
followed by a much longer description for those who like detail.

As a final request.. unless you have information which isn't presented
here.. please don't send any more mail.. my mail box is getting stretch
marks!...

oh well.. ennuff of this... here is the wrap.
---- cut here.. unless you are interested --
===== short description =====

   In the manuals for the stuff ya use. There isn't a "definitive list"
  of every known dot file, because some utilities use them to have
  initialization files, some for information, and others don't use them
  at all. What I can do though is show you a list of the ones I have in
  my directory & what they're for.
  
  .article
     Created by rn, this is what it uses to post your article; it's got
     the text of the last article you wrote & saved from your editor.
  .bashrc
     This is the init file for the bash shell.
  .contool
     This is the init file for contool, a Sun console window thing.
  .cshrc
     This is the init file for the C Shell; it's read by csh every time
     you start it up.
  .dbxinit
     This is used by the dbx debugger to set up flags, commands, etc.
  .defaults
     This is used by Sunview to set up my windows & environment.
  .elm
     This directory's used by the Elm mailer to store the files it uses.
  .emacs
     This is the init file for the Emacs editor.
  .exrc
     This is the init file for the ex editor (and also vi).
  .fileviewrc
     This is the init file for the fileview sunview program.
  .filter-rules
     This is used by Elm to filter mail into other files to make it
     easier to read mail from mailing lists, for example.
  .history
     This is created by the csh or bash (or others) shell, to keep a
     list of the commands you've done, if you have history enabled.
     Type the 'set' command and check out the value of 'history'.
     (Type 'set history=30' to make it keep the last 30 commands)
  .hushlogin
     This makes it so that when I log in I don't get the 'last login'
     and message of the day stuff. (Since I run it, I've already read
     the banner when I wrote it. :-) )
  .indent.pro
     This is the init file for the indent program, to indent C source.
  .inputrc
     This is used by the bash shell to handle how keys are bound.
  .joverc
     This is the init file for the jove editor.
  .letter
     This is used by rn for the email replies to posts ya do.
  .login
     This is read by csh (& bash et al) when you first log in.
  .logout
     This is used by csh et. al. when you log out.
  .mailrc
     This is the init file for Mail.
  .mh_profile
     This is used by the MH mailer.
  .monthtool
     This is used by the monthtool sunview program.
  .news_time
     This is used by my version of the System-V news program (it's
     the file news in system V looks at to see if you've read it yet)
  .newsrc
     This is the init file used by rn.
  .plan
     This is read whenever someone fingers you.
  .pnewsexpert
     This is also used by rn.
  .profile
     This is the init file for the Bourne (sh) shell.
  .project
     This is read whenever someone fingers you.
  .rhosts
     This is used by rsh, rlogin, etc, so you can log right in
     from remote systems.
  .rnhead
  .rninit
  .rnlast
  .rnlock
  .rnsoft
    These are all used by rn.
  .rolo
    This is used by the sunview rolotool utility.
  .signature
    This is your .signature, which appears at the end of posts
    in rn, and some mailers use it.
  .sunview
    This is the init file for Sunview.

----
many thanx to ..
    Brendan Kehoe - Widener Sun Network Manager - brendan at cs.widener.edu
Widener University in Chester PA               A Bloody Sun-vs-Dec War Zone

==== not so short description ====
  
  On our system we  have some information  for users,  some of which may
  apply to you and some may not.  Here it is anyway.  Maybe you knew all
  this already.  In answer to your question, NO, I don't know of any way
  other than word  of mouth to  find  out about these things-  and  just
  about  every piece of  software  you get  adds  half a dozen new ones.
  Just  don't dare DELETE  the damned things, for  fear that some module
  somewhere is gonna break!
  
  UNIX SETUP
  ==========
    New users on a unix system must do certain things to establish their
    identity and customize their environment. First, they must make sure
    that  they  set certain   initializtion  files.    These files   are
    described  below in order of importance,  and examples  are given at
    the end.  There are other   actions that  must /  may be taken,  and
    those are also listed below.
  
  .LOGIN AND .CSHRC (pronounced "dot-login and dot-sea-shark")
  =================
    Your  .login and .cshrc files  in your home directory  are  the most
    important environmental files, and you must consult with  your system
    manager to get them set up just right, or copy one from  your peers.
    The .login file is executed only when you first log  in, whereas the
    .cshrc file is executed every time you "fork" a new shell (pardon my
    French).  These files are like shell scripts, and are written in csh
    shell script   "language".  The   commands can be   found  with "man
    csh_builtins", or "man csh", or individually, as  for  instance "man
    umask".  Most shell scripts are executed by typing their name to the
    command line.  .csh and   .login are   exceptional  in that   typing
    ".cshrc"  gives you a  "permission denied".   To execute  these guys
    without logging in (say you have just changed  one and  want to test
    it) you say "source .login" or "source .cshrc".
  
  .EMACS FILE
  =========== 
    If  you are going to  use the emacs editor, you  must  have an emacs
    initialization file, which is  called  ".emacs".   This will set  up
    such things as customizing the  arrow keys or other special  keys to
    work with your terminal, establish links  to your network server for
    use  with gnus, among  other things.  The .emacs  file is written in
    lisp (!!!), an example is given below.
  
  .XINITRC FILE
  =============
    If you are running x windows, you will need an .xinitrc file to tell
    x  how  to set  up your windows  by   default.  Bare bones  X  is so
    primitive  that  you  will probably  be  running  a "window manager"
    aswell, which you will call from this  file.  For example, a popular
    window manager is "twm" (Tom's  window manager).   Twm has it's  own
    .twmrc  file which  ALSO sets  window and font parameters, which can
    conflict with   the  settings  in the   .xinitrc   file, and produce
    unpredictable results.  Another  window manager is "uwm", which uses
    a ".uwmrc" file.  For additional confusion there may be files called
    .Xrdb, .xsession and .Xresources, which can  also conflict with your
    .xinit, .uwm and .twmrc files.  I have no  idea what  these files do
    or why they could not have been all put  in the same  file!   If you
    have trouble with this hopeless mess, consult your system manager.
  
  .MAILRC FILE
  ============
    This file sets the defaults for your mail program. I THINK that this
    file is irrelevant  if you use  rmail through emacs  (which I highly
    recommend) instead of the mail program, though I may be wrong.
  
  .ALIAS FILE
  ===========
    This file saves you typing by making one command  represent another.
    In The example file below, if you type "ls" it interprets it to mean
    "ls -F".  This file is executed by the command "source $HOME/.alias"
    in  your .cshrc file.  Make sure  it's there  if   you want a .alias
    file.  Alternatively, you could put  all your alias commands in your
    .cshrc file, and obviate the need for this file altogether.
  
  .NEWSRC FILE
  ============
    This file keeps a track of which newsgroups you are subscribed to in
    gnus, and  which articles you have  read in those groups.  You don't
    need to do anything with this file, gnus takes care of it.  If it is
    deleted though,  you  may  want to  copy   one  from a  peer to save
    yourself the trouble of "unsubscribing" to all those news groups one
    by one.  No example is given below.
  
  .PLAN FILE
  ==========
    When  you "finger"  a    user, (example:   "finger slehar") you  get
    information about that user including who he  is  and where his home
    directory is  and how long  he's been logged  on,   etc.  One of the
    items that is given is the user's  "plan".  That  plan is simply the
    contents  of  their ".plan" file,  you  can put any message in there
    that you want.
    
  .SIGNATURE FILE
  ===============
    Ever notice how people on gnus or email have special fancy signature
    fields with their name and number and  some cute little quote? Well,
    you can have  one too!  All you do  is create a .signature file with
    all that cute stuff in it.  Using email in emacs  (M-x mail) you can
    call up  your .signature file  with  the  command "C-c C-w", and you
    will see it pop up in your posting.  In emacs gnus, (M-x gnus), your
    .signature file will be AUTOMATICALLY appended to any posting to the
    network, TRANSPARANT TO THE USER.  If you use "C-c C-w" in gnus, you
    will see one .signature, but will actually be posting two of them!
  
    .MSGSRC
    =======
    This file pertains to msgs utility,  activated by the command "msgs"
    (see  "man  msgs") in your  .login file,  which  informs  you of any
    pertinent system information when you log  in.  The file  contains a
    number that is  automatically incremented with  each system  message
    that you have read.  You can type "msgs" any time to read any unread
    messages, or you can type "msgs <n>" to read message  <n> (=positive
    integer), or "msgs -<n>" (=negative integer) to read the nth message
    before the last.
  
    .ORGRC, .DEFAULTS
    =================
    These are  mysterious initialization files of  some sort, you delete
    them at  your peril!  If  you find such  files, best just leave them
    alone and hope they don't cause too much trouble.
  
  OTHER INITIALIZATION ACTIONS
  ============================
  
  CHANGE PASSWORD
  ===============
    You should change   your password immediately  when  you  get a  new
    account, and periodically thereafter.   This is  not  only   to keep
    unauthorized people from deleting your files, but is a vital part of
    the security of the BU network of computers, AND  all  the computers
    that they are  connected to, i.e.   hundreds  of systems.  Malicious
    hackers regularly send    software "robots"  to  strange systems  to
    systematically try  out  all the  obvious passwords, "tom",  "dick",
    "harry",  1/22/53  (birthday), bucns,  etc.,  etc.  You should NEVER
    have such simple passwords, even for an account that you rarely use.
    Every password must  have at least  8 characters,  and must  include
    UpPeR and lOwEr case letters,  and preferably @$&^$*  non-alphabetic
    and numeric characters to foil the robotic assaults.   The privilege
    of access to an international network  of computers carries  with it
    the responsibility for the security of that network.  This threat is
    REAL; not so long ago a hacker succeeded in breaking into OUR system
    and using it as a springboard into other systems around the country.
    This kind of  thing is  bad for  our reputation,  ESPECIALLY  if  it
    happens more than once!
  
    You can  change  your  password   with the command yppasswd,   which
    prompts for your old password and  the new  one to replace it.  This
    command changes your password in the "yellow pages" (the whole local
    network) so that all  the  machines that  we use, except polar, will
    recognize the change.  People with accounts  on polar  should rlogin
    to polar and use the command passwd, which changes only the password
    for polar.
  
  CHANGE FULL NAME
  ================
    Notice  how in email and gnus,  some users have  their  full name as
    well as their user name,  as  in slehar at bucasb.bu.edu (Steve Lehar)?
    This little touch  is  accomplished with the command "chfn"  (change
    full name), though the command must be executed on park   where your
    mail account is really located.  So, the full procedure is...
   	% rlogin park
  	% chfn
    You will be prompted for information.
  
  EXAMPLE FILES
  =============
  ===============================================================================
  .alias file
  This file  saves  you typing by making  one command represent another.
  In this example, if you type "ls" it interprets it to mean "ls -F".
  ===============================================================================
  alias pwd		'echo $cwd'
  alias ls		ls -F
  alias lsd		find . -type d -print 
  
  ===============================================================================
  .cshrc file
  ===============================================================================
  # CSH Run Commands file.
  #
  #### This is sourced every time a CSH is started.  Keep the startup
  #### time down by keeping it small and simple; keep your paths short.
  
  #### set default protection on files (see info/files/protection)
  umask 022
  
  #### avoid cluttering with core files ####
  limit coredumpsize 0k
  
  #### define where to go for cd (no args)
  set cdpath=( $home )
  
  #### protect files from overwrite when using >
  set noclobber
  
  #### protect shell from being killed by ^d ####
  set ignoreeof
  
  #### history parameters
  set history=40
  set savehist=$history notify
  
  #### if calling a shell from emacs, make it a cshell, not tshell
  if ($?EMACS) setenv SHELL "/bin/csh"
  
  #### settings  for interactive shells ####
  set prompt="`hostname`: "
  
  #### set path ####
  set path=( 	.					\
  		/usr/bin/X11				\
  		/usr/local/bin				\
  		/usr/ucb				\
  		/usr/bin				\
  		/bin					\
  		~/bin					\
  		/vol/local/bin				\
  		/usr/hosts			)
  
  #### activate the aliases in the .alias file
  source $HOME/.alias
  
  ===============================================================================
  .emacs file
  ===============================================================================
    ;;;; gnus stuff ;;;;
    (autoload 'gnus "gnus" "GNU Emacs NNTP-based news reader" 1)
    (autoload 'gnus-post-news "gnus" "Post an article." t)
    (setq gnus-nntp-server "bu.edu")
    (setq gnus-your-domain "bu.edu")
    (setq gnus-your-organization "Boston University Center for Adaptive Systems")
    (setq gnus-auto-select-next 'quietly)
    (global-set-key "\C-x4g" 'gnus)
  
    ;;;; set arrow keys for x-terms ;;;;
    (progn
      (setq SS3-map (make-keymap))
      (define-key SS3-map "A" 'previous-line) ; up arrow
      (define-key SS3-map "B" 'next-line)     ; down arrow
      (define-key SS3-map "C" 'forward-char)  ; right arrow
      (define-key SS3-map "D" 'backward-char) ; left arrow
      (define-key global-map "\eO" SS3-map)
      )
  
    ;;;; make [tab] insert a [tab] in c-mode ;;;;
    (setq c-tab-always-indent nil)
  
    ;;;; make search case sensitive ;;;;
    (setq-default case-fold-search nil)
  
    ;;;; make text-mode the default for new buffers ;;;;     
    (setq default-major-mode 'text-mode)
  
    ;;;; turn on auto-fill automatically in text mode ;;;;
    (setq text-mode-hook
  	'(lambda () (auto-fill-mode 1)))
  
  ===============================================================================
  .login
  ===============================================================================
  # @(#)login 1.16 88/06/09 SMI
  ##################################################################
  #
  #         .login file
  #
  #         Read in after the .cshrc file when you log in.
  #         Not read in for subsequent shells.  For setting up
  #         terminal and global environment characteristics.
  #
  ##################################################################
  
  #### run ian's messages system ####
  msgs
  
  #### set environment variables ####
  setenv PAGER less
  setenv EDITOR emacs
  setenv NNTPSERVER "bu.edu"
  setenv MANPATH	"/usr/man:/thalamus/cluster/appl/man_pages/share/man"
  set mail=(10 /var/spool/mail/$USER)
  
  #### commands to perform at login ####
  setenv TTY `tty`
  
  if ( $TTY == /dev/console && -e /dev/fb ) then
  	clear
  else if ( $term == dialup || $term == unknown ) then
  	set noglob
  	set glob
  	set term=$TERM
  else if ( $term != sun && $term != sun-cmd ) then
  	set noglob
  	eval `tset -sQ`
  	set glob
  	echo TERM = $term
  endif
  
  ===============================================================================
  .mailrc
  This file sets up things for your mail program.
  ===============================================================================
  set noallowreversescan
  set alwaysusepopup
  set noaskbcc
  set bell=2
  set nodisablefields
  set noeditmessagewindow
  set noexpert
  set filemenu="+inbox +trash +personal +old_mail +outbox +dead.letter"
  set filemenusize=10
  set flash=2
  set interval=300
  set moveinputfocus
  set msgpercent=50
  set printmail='lpr -p'
  set trash=+trash
  set headerlines=10
  set maillines=30
  set popuplines=15
  set panelstyle=ThreeDImages
  set allnet
  set alwaysignore
  set append
  set noask
  set askcc
  set asksub
  set autoprint
  set DEAD=$HOME/mail/dead.letter
  set folder=mail
  set hold
  set indentprefix="	"
  set keep
  set nokeepsave
  set LISTER="ls -F"
  set MBOX=+old_mail
  set nometoo
  set noonehop
  set outfolder
  set EDITOR=emacs
  set crt=15
  set PAGER=more
  ignore Received Return-Path Message-Id Status Date In-Reply-To Organization
  ignore via apparently-to Status Received Message-Id Return-Path
  
  ===============================================================================
  X INITIALIZATION FILES (Courtesy of Dave Rosen)
  ======================
  
  .xinitrc	Is a set of commands executed by  startx (xinit) using
  		your default login shell ($SHELL). Startx is only used
  		to start X on a console.
  
  .xsession	Is a set of commands executed  (using the Bourne Shell
  		/bin/sh) when you  log into an  X session  except when
  		using  startx. So this  is mainly used  on  standalone
  		X-terminals (non-consoles).
  
  Because one is run by tcsh  (our default shell) and  one by sh, if you
  made  them the   same file, you  couldn't  put in anything that's  not
  recognized by  both.  So I  put almost everything   in  a file  called
  .xstartup, which is always executed using the Bourne Shell by .xinitrc
  or .xsession.
  
  .twmrc		Tom's Window Manager Read Commands file.  This is read
  		by twm in order to customize its menus, buttons, etc.
  
  .Xdefaults	Resources to be read into your  X resource database by
  		the command  "xrdb" in  your  .xinitrc and  .xsession.
  		This usually specifies the default behavior of various
  		X programs that do not have their own .*rc file.
  		For example,
  			XTerm*scrollBar: on
  		tells  the program  "xterm" that it  should enable its
  		scrollbar.
  
  .Xresources	Obsolete name for .Xdefaults.  I don't think  there is
  		any reason to have one  of these,  but make sure  your
  		.xsession  and  .xinitrc read  .Xdefaults instead   of
  		this.
  
  .Xrdb		Another  obsolete  name  for  .Xdefaults. Another file
  		that's not used as far as I know.
  
  I don't know what an  "xsession-env" file is,  but it  may be  created
  when you log in.  I don't think its something you need to put anything
  into.
  
  ======================================================================
  If  you  like simplicity  for  its own  sake,   you can set up your  X
  environment with  only one file,  the .xsession, and create a symbolic
  link  from your .xinitrc  file to it also  (ln -s .xsession .xinitrc).
  That way you have only one file to maintain.   You can also simply not
  call xrdb,  which eliminates  the  need for  a  .Xdefaults   file (AKA
  .Xresources or .Xrdb).  You can set the defaults  individually for the
  windows you want as shown below.
  
  #!/bin/sh
  ##########################################################################
  ##	.xsession (and .xinitrc)					##
  ## This file is called by xdb (the program that maintains the login	##
  ## window) when you login, or by xinit (or startx, which calls xinit)	##
  ## under the name .xinitrc (there is a symbolic link between them) to	##
  ## initialize your x environment.  					##
  ##########################################################################
  
  ########## set screen saver for 300 sec. (5 min) ####
  xset s 300
  
  #### run "Tom's window manager" ####
  twm > /dev/null &
  
  ########## open an x window ##########
  ## xterm			open an xterm window
  ## -title `hostname`		with title = hostname (name of host computer)
  ## -geometry 80x48+1+1		80 char wide, 48 lines high, positioned
  ##				1 pixel right & 1 pixel below top left corner
  ## -ls				run xterm as a login shell (?)
  ## -fn <fontname>		use font <fontname>
  xterm -title `hostname` -geometry 80x48+1+1 -ls -fn -adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1
  
  ======================================================================
  The following little extras can  be put  into your .xsession, .xinitrc
  or .xstartup  to customize  your environment.  Just  cut them  out and
  paste them in the proper files, with the ##comments still attached, so
  you will know what they are doing.
  
  LOAD X DEFAULTS
  ===============
  The  main advantage of   this one is that  you  can  type "xterm"  and
  automatically get the style of widow that you  want.  The disadvantage
  is  that you must  maintain  a .Xdefaults file  (which  for confusion,
  could also be  called .Xresources    or .Xrdb)  whose syntax is    not
  available through on-line documentation.
  
  ########## load X defaults ##########
  ## This program  reads your .Xdefaults file  to set up global defaults
  ## for all your X windows.  For  instance,  if .Xdefaults contains the
  ## line   "xterm*scrollBar:on" then  all    your  windows  will   have
  ## scrollbars.  Otherwise,  you  must set them  individually  with the
  ## xterm option "-sb".
  xrdb < $HOME/.Xdefaults
  
  EXECUTE YOUR .STARTUP FILE
  ==========================
  If you choose to use a .xstartup file, make this the last call in your
  .xinitrc  or .xsession file.  The  .xinitrc file uses /bin/sh, so  you
  must use the  shell version, whereas  .xsession uses  /bin/csh, so you
  must use the csh version.
  
  ########## sh startup call ##########
  . $HOME/.xstartup
  
  ########## csh startup call ##########
  exec $HOME/.xstartup
  
  MAKE ALT KEY INTO META KEY
  ==========================
  on some  terminals there is no  meta key.  If you   use emacs or tcsh,
  these are very convenient.
  
  ########## make alt key into meta key ##########
  ## The file given to xmodmap (here .Xkeymap) must contain the following
  ## lines...
  ## keysym Alt_L = Meta_L
  ## keysym Alt_R = Meta_R
  xmodmap $HOME/.Xkeymap
  
  ON CONSOLE OPEN CONSOLE WINDOW
  ==============================
  If you are on  the console, system  messages can  come up and  clutter
  your screen, sometimes in a way that you cannot erase them.   For this
  reason you may want a console window.  If you are  not on the console,
  you must not have such a window, because you will  be intercepting the
  console messages  illegally.   That  is the reason  for  the  test for
  unix*.
  
  ########## if on the console, open console window ##########
  ## expr "$DISPLAY" : 'unix*'	match the variable DISPLAY with 'unix*'
  ## > /dev/null			trash the result; but...
  ## &&				if successful match (i.e. DISPLAY = unix:0.0)
  ## xterm			then open an xterm window
  ## -T console			with title "console"
  ## -geometry 80x9+1-1		80 char wide, 9 lines high, position 1 pixel
  ##				from left margin, 1 pixel from bottom margin
  ## -C				to intercept console messages
  ## -ls				run xterm as a login shell
  ## &				and run concurrently.
  expr "$DISPLAY" : 'unix*' >/dev/null && xterm -T console -geometry 80x9+1-1 -C -ls &
  
  MAIL NOTIFIER
  =============
  A cute little mailbox  icon that beeps  and  turns black when  you get
  mail.
  
  ########## mail notifier ##########
  ## xbiff			run mail notifier 
  ## -geometry +1-1		located in bottom left corner
  ## &				and run concurrently
  xbiff -geometry +1-1 &
  
  ########## bug compatibility mode ##########
  ## needed to run old xterm on polar
  xset m 6 6 bc
  
  CONSOLE GRACEFUL EXIT ON CRASH
  ==============================
  This one ensures that the console will be left in  a usable state even
  if X crashes  ungracefully.  It may   even  be able to trap  an  early
  control-c
  
  ########## console graceful exit on crash ##########
  trap "kbd_mode -a; echo '.xinitrc: cleaning up'; exit 1" 0 2 15
  
  ADDITIONAL COMMENTS FROM IAN
  ============================
  One of the big annoyances in starting up an  X session is  the way the
  .xsession file  is handled.    XDM has a   script that  will  run your
  .xsession as if it were a program, if it  can.  Otherwise  it will let
  your shell (typically tcsh) READ it as  a list of instructions.  These
  are different.
  
  Thus, if you chmod +x .xsession, XDM will EXECUTE your script.  If you
  put "#!/bin/sh" at the top, it will fork a /bin/sh process to run your
  Bourne shell script.  If you want to use  csh language commands, leave
  out that comment.  Now, if you don't set  the execute permission flag,
  it will be  READ  as   a file, which  MUST  have the commands  in  the
  language of your shell.  So if you put Bourne  shell commands  in your
  .xsession file and your tcsh reads it, you could get errors  that bomb
  out your X session at log in.
  
  The above is also true  for  the startx command  one uses  on  console
  displays.  startx by default  reads a  file called .xinitrc.   But  if
  you're   smart, you link  this symbolically   to .xsession, since they
  really serve the exact same function.  The  startx command may be used
  on thalamus    or  bucasd consoles.    We   already  have XDM managing
  thalamus' console, and this  may be the  mode  for the other new Sun's
  we're installing soon; in  which case, you  can basically forget about
  startx.
  
thanx to slehar at park.bu.edu... who-ever you are

-- wow.. you are still reading this? I had given you up as having lost
interest :-)



More information about the Comp.unix.questions mailing list