.login file

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


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值