APPENDIX C: MORE ON THE .LOGIN FILE
There are a number of different systems
that you can log into, each of these requiring that specific variables
be set in your .login file. Following is a sample of code that can be placed
in your .login file to set the necessary variables. This file can be copied
from /usr/local/skel/mach.
C.1 Sample Code for Setting Machine Type
# Set machine type - idmach sets the environment variable MACH
#
source /usr/local/bin/idmach
#
# Set path for the specific hardware platform
#
# DEC workstations running the Ultrix operating system
#
if ($MACH == dec-bsd) then
set path = (. /usr/ucb /bin /usr/bin /usr/local/bin \
/usr/new /usr/bin/X11 /usr/hosts
)
#
#DEC Alpha systems running the OSF/1 operating system
#
else if ($MACH == dec-osf) then
set path = (. /sbin /usr/sbin /usr/bin /usr/ccs/bin \
/usr/bin/X11 /usr/local /usr/local/bin
)
#
# SGI workstations running the IRIX operating system
#
else if ($MACH == sgi-sysV) then
set path = (. /usr/sbin /usr/bsd /usr/bin /bin \
/usr/bin/X11 /usr/explorer/bin)
#
# Sun workstations running the SunOS operating system
#
else if ($MACH == sun-bsd) then
set path = (. /usr/ucb /bin /usr/bin /usr/local/bin /usr/new
\
/usr/bin/X11 /X/X11R5/bin /usr/hosts
/usr/lang)
endif
#
# set variables for the Cray environment
#
if ($MACH != cray-sysV) then
limit stacksize unlimited
limit coredumpsize 0
endif
#
#set environment variables for the SunOS operating system
#
if ($MACH == sun-bsd) then
setenv YNOTHOME /usr/local/ynot
setenv LD_LIBRARY_PATH /usr/lang/SC1.0:/X/X11R5/lib
setenv MANPATH /usr/lang/man:/usr/man:/usr/local/man:/usr/local/X11R5/man
endif
#
#
Return to top of page
C.2 Sample Code for Terminal Settings
In addition, a number of different terminal settings are required, depending
on whether you are logging in from an X terminal, alphanumeric terminal,
or dialing in from home. The following is a sample of the commands to perform
the necessary terminal settings. The file containing this code can be found
in /usr/local/skel/term.
#
# Set terminal characteristics - this code sets the TERM environment
# variable based on your device and also sets the erase character
# for the specific device
#
if ($?TERM == 0) then
setenv TERM undef
endif
#
# Standard ANSI terminal settings (e.g. VT220)
#
if ($TERM == "ansi") then
stty erase `^h'
stty erase `^?'
#
# X terminal settings
#
else if ($TERM == "xterm") then
#
# setting for HP X terminals
#
stty erase `^h'
#
# setting for NCD X terminals
#
stty erase `^?'
resize > /dev/null
#
# settings for VT100 terminals
#
else if ($TERM == "vt100") then
stty cr0
stty erase `^?'
#
# settings for VT300 terminals
#
else if ($TERM == "vt300") then
setenv TERM vt100
stty erase `^?'
#
# settings for VTxxx terminals from home
#
else if ($TERM == "p") then
setenv TERM vt100
tset
stty cr0
stty erase `^?'
else
set noglob; eval `tset -Q -m:?'; unset noglob
endif
echo "TERM = "$TERM
Return to top of page
Copyright
© UCAR 1998 - Disclaimer
- mmminfo@ncar.ucar.edu
Last Modified: 1 July 2000