source: trunk/debathena/debathena/dotfiles/cshrc @ 22913

Revision 22913, 5.6 KB checked in by tabbott, 16 years ago (diff)
In dotfiles: * Merge in quilt patches. These and other changes are summarized below. * Remove platform-specific code for non-Linux architectures. * Remove mksessiondirs and other ATHENA_SESSION_TMPDIr code; this is now handled by pam_mktemp * Run from.debathena and quota.debathena rather than from/quota in case debathena-from-config/debathena-quota-config are not installed * Remove unecessary athena/ from paths, except in prototype files which should remain unchanged for compatability. * Remove ancient extend alias from tcsh dotfiles. * Set ZEPHYR_CLIENT to not run zwgc on dialups; this avoids problems with zephyr in Debian automatically gaining focus. * Remove code for handling temporary home directories, since those can't happen anymore. * Stop setting XDG_DATA_DIRS; this is now controlled by debathena-desktop-config. * Stop setting COREDUMPSIZE; this was an IRIX workaround * Stop setting LD_LIBRARY_PATH to /usr/athena/lib; this breaks building things when /usr/athena is a symlink. * Stop setting XUSERFILESEARCHPATH to a directory that doesn't exist. * Change renew alias to use 'kinit -54' so we no longer require modified Kerberos. * Stop setting MANPATH, since we'd be setting it to the default anyway. * Remove athena_path logic, since athena_path would be PATH. * Only have one copy of the add alias, now that athena_path is gone. * Remove add_flags since it is always empty. * Don't temporarily remove add in cshrc. * Stop setting CDPATH. * Stop changing the default prompt for bash; the Debian default is better. * Stop changing the default prompt for tcsh, but leave the prompt character change, since there's a lot of documentation that uses it. * Stop configuring tcsh to not stat /afs/* when tab-completing; fakestat handles this. * Remove tcsh warning for "bind" alias.
  • Property svn:executable set to *
Line 
1# Global cshrc file
2#
3# $Id: cshrc,v 1.12 2007-08-22 18:12:33 ghudson Exp $
4
5# This file is sourced by default user file ~/.cshrc
6
7
8set initdir=/usr/lib/init
9
10# *******************   ENVIRONMENT SETUP   *******************
11
12# Compatibility with older versions of Athena tcsh
13set autolist=""
14if ($?tcsh) then
15  bindkey "^W" backward-delete-word
16  bindkey "^Z" complete-word
17  bindkey " " magic-space
18
19endif
20
21# Set host type and hostname variables.
22if (! $?ATHENA_HOSTTYPE) setenv ATHENA_HOSTTYPE "`/bin/machtype`"
23if (! $?HOST) setenv HOST "`hostname`"
24setenv HOSTTYPE "$ATHENA_HOSTTYPE"
25set hosttype=$HOSTTYPE
26set host=$HOST
27
28# add alias for attaching lockers
29alias add 'eval `/bin/attach -Padd \!:*`'
30
31# Set up standard system/user environment configuration (including setup of
32# environment variables, attachment of lockers, and setting of search path)
33
34if (! $?ENV_SET) then
35
36  setenv ENV_SET                                # Avoid unnecessary repeat
37
38  umask 077                             # Strictly protect files
39                                        #  (does not apply in AFS)
40  limit coredumpsize 0                  # Don't allow coredumps
41  setenv MORE -s                        # Default "more" behavior
42                                        # we are now down to -s
43                                        # because -d is wrong.
44  setenv EDITOR emacs                   # Set default editor
45  setenv VISUAL emacs                   # Set default screen editor
46  setenv MM_CHARSET iso-8859-1
47
48  # Set standard Athena path variables.  Actual $path (and thus $PATH)
49  # are set later, after ~/.environment is sourced.
50
51  setenv ATHENA_SYS `/bin/machtype -S`
52  if ( $ATHENA_SYS == "" ) then
53    setenv ATHENA_SYS @sys
54  endif
55  setenv ATHENA_SYS_COMPAT `/bin/machtype -C`
56
57  set bindir=arch/${ATHENA_SYS}/bin
58
59  if ( ! $?PRINTER && -e /var/athena/clusterinfo ) then
60    setenv PRINTER `awk '/LPR/ { print $3 }' /var/athena/clusterinfo`
61    if ( $PRINTER == "" ) unsetenv PRINTER
62  endif
63
64  # Reset the "home" and HOME variables to correspond to the actual
65  # location of the user's home directory.  This will avoid having
66  # long pathnames being printed when /mit/<user> is a symlink to a
67  # path within AFS.
68  #
69  # This code has been optimized to run as quickly as possible.  Since
70  # it is being invoked only at the beginning of the session, and
71  # prior to the inclusion of any of the user's other dotfiles, we can
72  # assume that the current directory is the user's home directory.
73  # Also, to avoid having the shell re-evaluate the current contents
74  # of the directory, we help it by resetting its "cwd" variable.  We
75  # do error checking just in case the path somehow disappears.
76
77  set x=`(cd && /bin/pwd)`
78  if ("$x" != "") then
79    set home=$x
80    if ("$x" == "`/bin/pwd`") then
81      set cwd=$x
82    endif
83  endif
84  unset x
85
86  # Run user environment customizations identified in your
87  # ~/.environment file.  This is the place to include your own
88  # environment variables, attach commands, and other system wide
89  # setup commands.  You can also cancel default behaviors listed
90  # above with "unsetenv" or "setenv".  ~/.environment is not sourced
91  # if NOCALLS is set (i.e., if you selected the xlogin "Ignore your
92  # customizations" option when you logged in).
93
94  if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
95
96  # Set up default search path, if not yet set.  Use your ~/.path file
97  # to provide an alternative path -- this file should be of the form
98  # "set path=...", and can refer to the shell variable $athena_path,
99  # defined above. The ~/.path file should list a complete path, since
100  # the path identified there will be used INSTEAD of the default
101  # path, not appended.  ~/.path is not sourced if the xlogin "Ignore
102  # your customizations" option was selected to begin the session.
103
104  if ((! $?NOCALLS) && (-r ~/.path)) then
105    # User-specified path
106    source ~/.path
107  else
108    # Standard Athena path
109    set path=(`/usr/bin/athdir $HOME` $PATH .)
110  endif
111
112endif
113
114# Set appropriate bin directory variable for this platform
115# (e.g., vaxbin for VAXstations, decmipsbin for pMAXen, etc.;  this will
116# be included in actual searchpath as ~/$bindir -- e.g., ~/vaxbin):
117set bindir=arch/${ATHENA_SYS}/bin
118
119# *******************  C SHELL SETUP   *******************
120
121# Set up standard C shell initializations
122
123set noclobber                   # Don't overwrite files with redirection
124
125if ($?prompt) then              # For interactive shells only (i.e., NOT rsh):
126  # Set prompt.
127  set promptchars="%#"
128  set interactive               #   Provide shell variable for compatability
129endif
130
131# Set up standard C shell aliases
132
133#   alias for re-establishing authentication
134alias renew 'kinit -54 $USER && fsid -a && zctl load /dev/null'
135
136#   alias for a convenient way to change terminal type
137alias term 'set noglob; unsetenv TERMCAP; eval `tset -s -I -Q \!*`'
138
139#   aliases dealing with x window system
140alias xresize 'set noglob; eval `resize -c` || unset noglob'
141
142if ($?XSESSION) then
143  if ("$XSESSION" == "") then
144    alias logout        'exit && end_session'           # logout for X
145  else
146    alias logout        'exit && kill -HUP $XSESSION'   # logout for X
147  endif
148endif
149
150#   aliases dealing with subjects
151alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
152alias setup_tty '( setenv SUBJECT \!* ; $SHELL )'
153if ($?XSESSION) then
154  alias setup setup_X
155else
156  alias setup setup_tty
157endif
158alias remove 'setenv SUBJECT \!* ; source $initdir/env_remove'
159
160# If this is a subject window, run the env_setup script
161if (($?SUBJECT) && (-r $initdir/env_setup)) source $initdir/env_setup
162
163
164# All of the C shell initializing commands above can be overridden by
165# using "unset" or "unalias" commands (or by changing things using
166# "set" or "alias" again) in your ~/.cshrc.mine file, which is sourced
167# here.  ~/.cshrc.mine is not sourced if the xlogin "Ignore your
168# customizations" option was selected to begin the session.
169
170if ((! $?NOCALLS) && (-r ~/.cshrc.mine)) source ~/.cshrc.mine
Note: See TracBrowser for help on using the repository browser.