What should be in .cshrc vs .login

Kenstir kenc at madmax.Viewlogic.COM
Tue Oct 30 03:34:34 AEST 1990


In article <1990Oct23.045911.472 at athena.mit.edu>, jik at athena.mit.edu
(Jonathan I. Kamens) writes:
|>   Our users log into X displays the vast majority of the time, and
our X login
|> setup doesn't even *look at* .login, so putting the initialization
stuff there
|> isn't an option.  Putting it in .cshrc, however, makes it work both
for X
|> logins and for dialup logins (which do use .login, obviously :-).

It certainly is an option.  Check out this in the .xsession file:
	#!/bin/csh
	#         ^^^ don't use -f option
	#
	#	.xsession	xdm display manager startup file
	#
	# $Id: .xsession,v 1.3 90/03/27 11:10:14 kenc Exp $

	# want to read .cshrc AND .login when starting a session
	source .login
	
	sh ~/.xinitrc

This is bordering on the religious, but there is a place for the .login
file.  For instance:
	if (-e /usr/games/fortune) /usr/games/fortune

doesn't want to be in the .cshrc, and resetting environment variables
in the .cshrc which may have been purposefully altered is not a great
idea.

--
Kenneth H. Cox
Viewlogic Systems, Inc.
kenstir at viewlogic.com
...!harvard!cg-atla!viewlog!kenstir



More information about the Comp.unix.shell mailing list