Configuring the environment
The shells and the individual applications often allow a high degree of configuration.
This can result in the screens for one person looking and behaving differently
to those of another. This configuration can be done on a system-wide basis,
overridden on an individual basis.
There are lots of bits, and much detail in here...
Zsh
Login
When you first login, bash reads a startup file .profile (in your
home directory).
This contains initialisation instructions
for your shell environment. This is a good place to set your
PATH variable if needed. To run testit
, put this in your
.profile:
PATH=/student1/os/ostutes/bin:$PATH
[an error occurred while processing this directive]
Add comment
Shell startup
Every time you invoke a non-login shell, the file .bashrc (in
your home directory) is read. This is a good place to put aliases, etc.
[an error occurred while processing this directive]
Add comment
Prompt
The normal prompt is stored in the shell variable PS1. Set this to change the
prompt. Various substitutions are performed on the value of PS1 before it is
printed.
-
\w is the current working directory.
-
\! is the history number
of this command.
-
\t is the current date.
-
\h is the hostname
PS1="[\h \w \! \t]"
prints as
[umi ~/access 517 09:29:49]
on my machine.
The bash man page has more information on these.
[an error occurred while processing this directive]
Add comment
Functions
[an error occurred while processing this directive]
Add comment
Other shells
Just for completeness. Other shells use .profile, .login, .logout, .cshrc,
etc.
Search path
Commands are searched for on the search path, which is a `:' separated list
of directories. The search is strictly left-to-right. This is set in the PATH
variable, which will be set to something like
PATH=.:/bin:/usr/bin
This is usually set in the .profile. You can change it to include additional
directories. Don't remove directories, or some commands will stop working.
[an error occurred while processing this directive]
Add comment
Shell
The command chsh can be used to set your login shell to one of the other available
ones.
Net news
The list of newsgroups currently known is stored in the file .newsrc in your
home directory. This consists of a list of lines such as
aus.general! 1-8191
aus.auug: 1-1180
The `:' shows that aus.auug is currently subscribed to, the `!' that aus.general
is not. The list at the end shows how much of the news has been read in each
group.
You can edit this file and choose which groups you want to read by setting
the `:' or `!' for each group. Allow about an hour.
If you use the newsreader nn
the order in which groups are presented for reading may be controlled by the
file .nn/init in your home directory. The groups in the list there are those
presented first.
X Window startup
The X Window system is started from a login shell run by xdm
.
This
executes a startup script /pub/local/lib/X11/xdm/Xsession.
This runs a set of commands.
These are all run asynchronously except for xlogout - when xlogout terminates
the X Window session terminates.
You can change the startup behaviour for X by creating a file .xsession
in your home directory. Be very careful doing this - if you mess it up
you can't login.
[an error occurred while processing this directive]
Add comment
X resources
The appearance and some behaviour of X programs is controlled by resources.
A resource is a property such as height, width, foreground colour, font, etc.
The application as a whole has resources, and individual components such as
labels and buttons also have resources.
Application resources may be set by command line keyword options
(not positional).
Some example options are
-foreground white \
-background black \
-geometry 80x24+0+0
which could be used for a white on black 80 column by 24 row xterm at the origin
(0,0).
xterm -foreground red -background green
[an error occurred while processing this directive]
Add comment
Resource database
This mechanism is used on a one-off basis. To make all xterms use a particular
font, a resource database is used. The easiest way to put values into this
database is to put them in the resource file .Xdefaults.
This file is typically
read whenever an application starts. The simplest format is
app-name*resource: value
as in
xterm*foreground: white
xterm*background: black
An alternative is to use the ``class name'' as in
XTerm*foreground: white
[an error occurred while processing this directive]
Add comment
Fonts
Fonts are complicated. A font is usually designed by a company. There is a
point size, a weight (bold, light), slant (italics, roman) and lots of other
goodies. Use the program xfontsel or xfbrowse to browse the 900-odd fonts available.
Once you have one you like, set it in the resource file for use by all applications.
The font used is controlled by the resource ``font'' for Athena-based applications,
and ``fontList'' for Motif applications:
*font: -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1
*fontList: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1
[an error occurred while processing this directive]
Add comment
Xterm
An xterm can be set to run a Unix command using the -e option. Everything from
the -e on is taken to be a command. For example, running pine within an xterm
is done by
xterm -e pine
You can show in the title bar that it is nn by also setting the -title option:
xterm -title pine -exec pine
An xterm also has additional resources. To have a scrollbar showing, the resource
XTerm*scrollBar: True
should be set. This allows you to use the mouse to scroll up and down.
Text can be copied from an xterm to the clipboard by dragging over it with
the left button (it highlights the selected text). It can then be pasted into
an xterm by pressing the left button.
It will be inserted at the cursor insertion
point. Other X applications may also allow copying to and from the clipboard.
To bind the PageUp and PageDown keys to the scrollbar, the translations resource
should be set as well:
xterm*vt100.translations: #override\n\
Home:\
scroll-back(100,page) \n\
End:\
scroll-forw(100,page) \n\
Prior: \
scroll-back(1,page) \n\
Next: \
scroll-forw(1,page)
[an error occurred while processing this directive]
Add comment
Moxfm
moxfm
is the file manager used now.
It shows a central file screen, plus applications around the side.
The configuration files are kept in $HOME/.fm.
You can edit an icon by clicking the right button on it.
You can add icons by clicking the right button on the background.
You can place an icon onto the desktop by dragging it.
[an error occurred while processing this directive]
Add comment
This page is
http://pandonia.canberra.edu.au/OS/l3_2.html,
copyright Jan Newmarch.
It is maintained by Jan Newmarch.
email:
jan@ise.canberra.edu.au
Web:
http://pandonia.canberra.edu.au/
Last modified: 6 August, 1996