home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20120521.etc.tar.gz / bradford.20120521.etc.tar / etc / csh.login < prev    next >
Text File  |  2006-04-25  |  7KB  |  313 lines

  1. #
  2. # System csh.login for tcsh,
  3. # (c) Werner Fink '93
  4. #
  5. # PLEASE DO NOT CHANGE /etc/csh.login. There are chances that your changes
  6. # will be lost during system upgrades. Instead use /etc/csh.login.local for
  7. # your local environment settings.
  8. #
  9. onintr -
  10. set noglob
  11. #
  12. # Initialize terminal
  13. #
  14. if ( -o /dev/$tty && ${?prompt} ) then
  15.     # Console
  16.     if ( ! ${?TERM} )           setenv TERM linux
  17.     if ( "$TERM" == "unknown" ) setenv TERM linux
  18.     if ( ! ${?SSH_TTY} ) then
  19.     # No tset available on SlackWare
  20.     if ( -x "`which stty`" ) stty sane cr0 pass8 dec
  21.     if ( -x "`which tset`" ) tset -I -Q
  22.     endif
  23.     # on iSeries virtual console, detect screen size and terminal
  24.     if ( -d /proc/iSeries && ( $tty == "tty1" || "$tty" == "console")) then
  25.     setenv LINES   24
  26.     setenv COLUMNS 80
  27.     if ( -x "`which initviocons`" ) then
  28.         eval `initviocons -q -e -c`
  29.     endif
  30.     endif
  31.     settc km yes
  32. endif
  33. unsetenv TERMCAP
  34.  
  35. #
  36. # The user file-creation mask
  37. #
  38. umask 022
  39.  
  40. #
  41. # Setup for gzip and (t)csh users
  42. #
  43. if (! ${?CSHRCREAD} ) then
  44.     # setenv GZIP -9
  45.     setenv CSHEDIT emacs
  46. endif
  47.  
  48. #
  49. # In case if not known
  50. #
  51. if (! ${?UID}  ) set -r  UID="`id -ur`"
  52. if (! ${?EUID} ) set -r EUID="`id -u`"
  53. if (! ${?USER} ) set    USER="`id -un`"
  54. if (! ${?LOGNAME} ) set LOGNAME=$USER
  55.  
  56. if (! ${?MAIL} ) setenv MAIL /var/spool/mail/$USER
  57. if (! ${?HOST} ) setenv HOST "`hostname -s`"
  58. if (! ${?CPU}  ) setenv CPU  "`uname -m`"
  59. if (! ${?HOSTNAME} ) setenv HOSTNAME "`hostname -f`"
  60. if (! ${?LOGNAME}  ) setenv LOGNAME  "$USER"
  61. if ( ${CPU} =~ i?86 ) then
  62.     setenv HOSTTYPE i386
  63. else
  64.     setenv HOSTTYPE "$CPU"
  65. endif
  66. setenv OSTYPE linux
  67. setenv MACHTYPE "${CPU}-suse-${OSTYPE}"
  68.  
  69. #
  70. # Get message if mail is reached
  71. #
  72. set mail=$MAIL
  73.  
  74. #
  75. # You may use /etc/initscript, /etc/profile.local or the
  76. # ulimit package instead to set up ulimits and your PATH.
  77. #
  78. # if (! -r /etc/initscript ) then
  79. #     limit coredumpsize    0    # don't create core files
  80. #     eval limit `limit -h datasize`
  81. #     eval limit `limit -h stacksize`
  82. #     eval limit `limit -h memoryuse`
  83. # endif
  84.  
  85. #
  86. # Make path more comfortable
  87. #
  88. unset noglob
  89. set _xpath
  90. set _upath
  91. set _spath
  92. if ( "$uid" == "0" ) then
  93. if ( -d /opt/gnome/sbin ) set _spath=( /opt/gnome/sbin )
  94. if ( -d /opt/kde3/sbin  ) set _spath=( /opt/kde3/sbin $_spath )
  95.     set _spath=( /sbin /usr/sbin /usr/local/sbin $_spath )
  96. endif
  97. foreach _d (${HOME}/bin/${CPU} ${HOME}/bin \
  98.         /var/lib/dosemu \
  99.         /usr/games \
  100.         /opt/bin \
  101.         /opt/gnome/bin \
  102.         /opt/kde3/bin \
  103.         /opt/kde2/bin \
  104.         /opt/kde/bin \
  105.         /usr/openwin/bin \
  106.         /opt/cross/bin )
  107.     if ( -d $_d ) set _upath=( $_upath $_d )
  108. end
  109. unset _d
  110.  
  111. if ( ${?OPENWINHOME} ) then
  112.     if ( -d $OPENWINHOME/bin ) then
  113.     set _xpath=( $OPENWINHOME/bin )
  114.     endif
  115. endif
  116. if ( -d /usr/bin/X11 ) then
  117.     set _xpath=( /usr/bin/X11   $_xpath )
  118. else if ( -d /usr/X11R6/bin ) then
  119.     set _xpath=( /usr/X11R6/bin $_xpath )
  120. else if ( -d /usr/X11/bin ) then
  121.     set _xpath=( /usr/X11/bin   $_xpath )
  122. endif
  123.  
  124. set _upath=( $_upath $_xpath )
  125. unset _xpath
  126.  
  127. #
  128. # Doing only one rehash
  129. #
  130. set -f path=( $_spath $path $_upath )
  131. unset _upath
  132. unset _spath
  133. set noglob
  134.  
  135. #
  136. # For all readline library based applications
  137. #
  138. if ( -r /etc/inputrc && ! ${?INPUTRC} ) setenv INPUTRC /etc/inputrc
  139.  
  140. #
  141. # Set some environment variables for TeX/LaTeX
  142. #
  143. if ( ${?TEXINPUTS} ) then
  144.     setenv TEXINPUTS ":${TEXINPUTS}:${HOME}/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX"
  145. else
  146.     setenv TEXINPUTS ":${HOME}/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX"
  147. endif
  148.  
  149. #
  150. # Configure the default pager on SuSE Linux
  151. #
  152. if (! ${?LESS} ) then
  153.     setenv LESS "-M -I"
  154.     setenv LESSOPEN "lessopen.sh %s"
  155.     setenv LESSCLOSE "lessclose.sh %s %s"
  156.     setenv LESS_ADVANCED_PREPROCESSOR "no"
  157.     if ( -s /etc/lesskey.bin ) then
  158.         setenv LESSKEY /etc/lesskey.bin
  159.     endif
  160.     setenv PAGER less
  161.     setenv MORE -sl
  162. endif
  163.  
  164. #
  165. # Minicom
  166. #
  167. if (! ${?CSHRCREAD} ) then
  168.     setenv MINICOM  "-c on"
  169. endif
  170.  
  171. #
  172. # Current manpath
  173. #
  174. if (! ${?CSHRCREAD} && -x /usr/bin/manpath ) then
  175.     if ( ${?MANPATH} ) then
  176.     setenv MANPATH "${MANPATH}:`(unsetenv MANPATH; manpath -q)`"
  177.     else
  178.     setenv MANPATH "`(unsetenv MANPATH; manpath -q)`"
  179.     endif
  180. endif
  181.  
  182. #
  183. # Some applications do not handle the XAPPLRESDIR environment properly,
  184. # when it contains more than one directory. More than one directory only
  185. # makes sense if you have a client with /usr mounted via nfs and you want
  186. # to configure applications machine dependent. Uncomment the lines below
  187. # if you want this.
  188. #
  189. #setenv XAPPLRESDIR "$XAPPLRESDIR:/var/X11R6/app-defaults:/usr/X11R6/lib/X11/app-defaults"
  190.  
  191. #
  192. # Set INFOPATH to tell xemacs where he can find the info files
  193. #
  194. if (! ${?CSHRCREAD} ) then
  195.     if ( ${?INFODIR} ) then
  196.     setenv INFODIR "${INFODIR}:/usr/local/info:/usr/share/info:/usr/info"
  197.     else
  198.     setenv INFODIR "/usr/local/info:/usr/share/info:/usr/info"
  199.     endif
  200.     setenv INFOPATH $INFODIR
  201. endif
  202.  
  203. #
  204. # These settings are recommended for old motif applications
  205. #
  206. if (! ${?CSHRCREAD} ) then
  207.     setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
  208.     setenv XNLSPATH  /usr/X11R6/lib/X11/nls
  209. endif
  210.  
  211. if ( -s /etc/nntpserver ) then
  212.    setenv NNTPSERVER "`cat /etc/nntpserver`"
  213. else
  214.    setenv NNTPSERVER news
  215. endif
  216.  
  217. if ( -s /etc/organization ) then
  218.    setenv ORGANIZATION "`cat /etc/organization`"
  219. endif
  220.  
  221. if (! ${?CSHRCREAD} ) then
  222.    setenv COLORTERM 1
  223. endif
  224.  
  225. #
  226. # For RCS
  227. #
  228. #setenv VERSION_CONTROL numbered
  229.  
  230. #
  231. # Source the files generated by SuSEconfig
  232. #
  233. # But do not source this if CSHRCREAD is already set to avoid
  234. # overriding locale variables already present in the environment
  235. #
  236. if (! ${?CSHRCREAD} ) then
  237.     if ( -r /etc/profile.d/csh.ssh )    source /etc/profile.d/csh.ssh
  238.     if ( -r /etc/SuSEconfig/csh.login ) source /etc/SuSEconfig/csh.login
  239.     if (! ${?SSH_SENDS_LOCALE} ) then
  240.     if ( -r /etc/sysconfig/language && -r /etc/profile.d/csh.utf8 ) then
  241.         set _tmp=`sh -c '. /etc/sysconfig/language; echo $AUTO_DETECT_UTF8'`
  242.         if ( ${_tmp} == "yes" ) source /etc/profile.d/csh.utf8
  243.         unset _tmp
  244.     endif
  245.     endif
  246. endif
  247.  
  248. #
  249. # Source profile extensions for certain packages
  250. #
  251. if ( -d /etc/profile.d && ! ${?CSHRCREAD} ) then
  252.     set _tmp=${?nonomatch}
  253.     set nonomatch
  254.     unset noglob
  255.     foreach _s ( /etc/profile.d/*.csh )
  256.     if ( -r $_s ) then
  257.         source $_s
  258.     endif
  259.     end
  260.     set noglob
  261.     if ( ! ${_tmp} ) unset nonomatch
  262.     unset _tmp _s
  263. endif
  264.  
  265. #
  266. # System wide configuration of bourne shells like ash
  267. #
  268. if (! ${?CSHRCREAD} ) then
  269.     setenv ENV /etc/bash.bashrc
  270. endif
  271.  
  272. #
  273. # Avoid overwriting user settings if called twice
  274. #
  275. if (! ${?CSHRCREAD} ) then
  276.     setenv CSHRCREAD true
  277.     set -r CSHRCREAD=$CSHRCREAD
  278. endif
  279.  
  280. #
  281. # Restore globbing on Ctrl-C
  282. #
  283. onintr
  284. unset noglob
  285.  
  286. #
  287. # Local configuration
  288. #
  289. if ( -r /etc/csh.login.local ) source /etc/csh.login.local
  290.  
  291. #
  292. # An X session
  293. #
  294. if (${?TERM} && -o /dev/$tty && ${?prompt}) then
  295.     if (${TERM} == "xterm") then
  296.     if ( -f /etc/motd ) cat /etc/motd
  297.     if (! ${?SSH_TTY} ) then
  298.         # Go home
  299.         cd; echo "Directory: $cwd"
  300.     endif
  301.     #
  302.     # shadow passwd
  303.     # Note: on normal console this will be done by /bin/login
  304.     if ( -x "`which faillog`" && -r /var/log/faillog ) faillog
  305.     # Last but not least
  306.     date
  307.     endif
  308. endif
  309.  
  310. #
  311. # End of /etc/csh.login
  312. #
  313.