head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	95.03.23.02.51.45;	author svalente;	state Exp;
branches;
next	;


desc
@login
@


1.1
log
@Initial revision
@
text
@# Prototype global .login file
# $Author: cfields $
# $Source: /source/config/dotfiles/system/RCS/login,v $
# $Header: /source/config/dotfiles/system/RCS/login,v 1.15 1995/01/27 04:09:48 cfields Exp cfields $

# This file is sourced by default user file ~/.login

set initdir=/usr/athena/lib/init


if (! -r ~/.hushlogin) then
	set verbose_login	# Echo messages unless user has ~/.hushlogin.
endif
/bin/stty dec			# Use DEC-style control characters



# *******************   ENVIRONMENT SETUP   *******************

# The ~/.cshrc file sets environment variables, attaches lockers, and sets
# the command search path.  It has already been sourced at this point.

# Check that user home directory is available

if ($?TMPHOME) then
    echo "WARNING:"
    echo ""
    echo "Your home directory is currently unavailable."
    echo "This is probably due to a problem with the"
    echo "fileserver on which your directory is stored."
    echo ""
    echo "You may use a temporary directory for this session."
    echo "If you do, any files you create and any mail you"
    echo "incorporate will be DELETED when you logout and lost forever."
    echo ""
    echo "Would you like to continue this session, using a TEMPORARY"
    echo -n "directory? (yes,no) [The default is no] "
    set answer = ($<)
    if ("$answer" =~ [yY]*) then
	echo "Continuing with temporary directory..."
	mkdir ~/Mail
    else
	kill -HUP $$
    endif
endif
	

# *******************   DEVICE SETUP   *******************

# Set device type if interactive session (e.g., dialup)

if (("$term" == switch) || ("$term" == network) || ("$term" == dialup)) then

    # The standard terminal emulation is vt100.  To use a different emulation,
    # set the environmental variable DEF_TERM in your ~/.environment file to
    # to the device you want to emulate (one that the system will recognize).

    if (! $?DEF_TERM) setenv DEF_TERM vt100
    set noglob; eval `tset -s -I -Q "?${DEF_TERM}"` || unset noglob

endif


# If the login is on an X display but the DISPLAY variable has not 
# been set, ask the user what the DISPLAY should be (e.g., rlogin)

if (("$term" =~ xterm*) && (! $?DISPLAY)) then
	echo -n "What DISPLAY are you using [default: none]? "
	set response = ($<)
	if ("$response" != "") then
		if ($response =~ *:*) then
			echo "Setting DISPLAY to $response"
			setenv DISPLAY "$response"
		else
			echo "Setting DISPLAY to ${response}:0"
			setenv DISPLAY "${response}:0"
		endif
	endif
endif


# *******************   ACTIVITY STARTUP   *******************

# Run standard system/user startup activities

# Run default system startup activities.  To skip these, put the command
# "set skip_tty_startup" in your ~/.environment file.

if (! $?skip_tty_startup) then
	if ($?verbose_login) echo "Running standard startup activities ..."
	set ignoreeof			# ^D won't log you out
	zwgc				# Start Zephyr client
	from -t -n			# Check for mail
	(olc who &) >& /dev/null	# Ping the OLC server
endif


# Run the tty-session customizing commands in your ~/.startup.tty file.

if (-r ~/.startup.tty) then
	if ($?verbose_login) then		# Don't echo if noninteractive
	  echo "Running custom startup activities listed in ~/.startup.tty ..."
	endif
	source ~/.startup.tty
endif


# Run notification system, lert. To skip this (a generally bad idea unless
# you plan to run it yourself), put the commend "set skip_lert" in your
# ~/.environment file.

if (! $?skip_lert) then
	lert -q				# Don't want to see server errors.
endif
@
