Startup/configuration files

Your environment can be customized to meet your needs and/or esthetical standards. This is usually done with the help of various startup and configuration files. These are shell scripts which typically reside in your home directory, and have their names stating with '.'. They are not reported by an 'ls' command, unless option -a is used, or one specfically asks for them, like 'ls .*'.

A very efficient way for a beginner to customize his/her environment is to look at other people's startup files.

csh and tcsh customization

csh (and tcsh) is using three customization files. At the login time two of them are executed: .login and then .cshrc. Whenever a new shell is started, the .cshrc file is executed in the new shell. At the logout time the shell invokes .logout file.

Bourne and Korn shell initialization

If you think about using these shell, you presumably know what you are doing. For completeness, though, we mention that these shells invoke .profile file at the login time.

Korn shell is executing in addition a file .kshrc every time a new shell is created. In fact you may customize your Korn shell environment, by invoking different startup file, depending on your need. This can be done by defining an environmental variable ENV referring to the desired file.

Start-up files in X

X Windows is very flexible and very powerful. The first relates to a large number of ways of achieving a desired goal, the second to a large number of possible configuration parameters, resources, etc.. etc.. The longer you live in X environment, less confusing it becomes.

Start-up files can be categorized into:

Initialization files

X Window System can be started in different ways and, sure enough, different startup files are involved. It gets complicated real fast, therefore only some hints are given here:

Resource files

These are files used to customize various products, Netscape and Mosaic, editors, mail handlers, etc.. etc... They define various parameters controlling appearance and functionality of the programs, they can even define application-specific keyboard mapping, if so desired.

An important resource file is .Xdefaults. Its format is:

application_name*resource_name      value
Here are some example lines from a .Xdefaults file:
emacs*font:                                10x20
Mosaic*anchorColor:                        red
4Dwm*keyboardFocusPolicy:                  click
In addition to the .Xdefaults file applications may be taking their parameters from the application-specific configuration files, for example:
Configuration file        Aplication

.emacs                      emacs
.explorerrc                 explorer
.mh_profile                 MH
.mailcap                    mosaic
.piafrc                     piaf
Take a look at .* files in your home directory!

startup file for window manager

This file (.mwmrc) is used to define parameters, menus, etc.. for your window manager. You can define your own menus, or substitute your own programs to be invoked from the standard menus.


Links to other D0 pages

  • Top of this document.
  • D0 UNIX Page
  • D0 home Page

  • Last updated September 10, 1995.
    A.P.