The .login file
The .login file
The following is an example .login file. The same rules apply here as did with the .cshrc file.
###############################################################################
# #
# Example .login file #
# #
# by Chris Taylor #
# #
###############################################################################
# Set erase, kill, and interrupt keys
stty crt erase '^H' kill '^U' intr '^C'
# Set the creation mask setting so that everyone can read my files
# but can't write to them
umask 022
## Set environment variables
# Set my terminal type to xterm
setenv TERM xterm
# Select vi as my editor of choice
setenv EDITOR /usr/ucb/vi
# Show the path to my mailbox
setenv MAIL /usr/spool/mail/$USER
# Set mail program
setenv MAILER /usr/ucb/mail
# Set paging program
setenv PAGER more
# Set default printer
setenv PRINTER hp
if (-f /bin/sun != 0) then
# Using a Sun
if ("`tty`" == "/dev/console") then
# Using console
setenv DISPLAY $cpu":0.0"
# Ask if I want to start X11
echo ""; echo -n "Start up X11? "
set ans = $<
if ("$ans" != "n" && "$ans" != "N") then
# Start X11
setenv DISPLAY $HOST/:0
stty -tostop
exec xinit .xstartup ; kbd_mode -a
clear
endif
unset ans
else
setenv DISPLAY `last | grep $USER | head -1 | /
awk '{print $3}' | awk '{FS=".";print $1 "." $2 ":0" }'`
endif
endif
# end of .login file
Web links:
http://www.unl.csi.cuny.edu/tutorials/viunix/subsubsection3_3_6_2.html#SECTION0003620000000000000
1059

被折叠的 条评论
为什么被折叠?



