home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3506 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.8 KB  |  51 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!gatech!darwin.sura.net!wupost!usc!venice!gumby.dsd.trw.com!deneva!deneva.sdd.trw.com!warner
  3. From: warner@redding.etdesg.trw.com (Jeff Warner)
  4. Subject: Re: How to make tcsh the login shell w/0 bothering operator? !FAQ
  5. In-Reply-To: tinsel@uiuc.edu's message of Mon, 10 Aug 1992 04:16:45 GMT
  6. Message-ID: <WARNER.92Aug17144239@redding.etdesg.trw.com>
  7. Sender: news@deneva.sdd.trw.com
  8. Organization: TRW, Inc., Redondo Beach...
  9. References: <28267@option.GBA.NYU.EDU> <Bsr2Jy.oD@news.cso.uiuc.edu>
  10. Date: 17 Aug 92 14:42:39
  11. Lines: 38
  12.  
  13. In article <Bsr2Jy.oD@news.cso.uiuc.edu> tinsel@uiuc.edu (Thomas Aaron Insel) writes:
  14.  
  15.    > I built the tcsh myself and can have it run by typing "tcsh" in a csh
  16.    > (the login shell). Now, I want to make tcsh the default login shell,
  17.    > BUT do it without bothering the system operator. Trust me, I've done
  18.    > some homework, read the faq and fine-manual, but I can't find an
  19.    > answer.
  20.  
  21. heres what I do.  I placed the following code in the top of my .cshrc;
  22. since the .cshrc is read first, before the .login.  Place at top of
  23. the .cshrc because starting tcsh will be faster.
  24.  
  25. #
  26. # Start up tcsh if it is not already running, it exists, and this
  27. # is an interactive shell.  This should be on initial login only;
  28. # thus, start tcsh as a login shell.  We cannot start tcsh, or any
  29. # shell as a login shell because we would need to set argv[0]=(-tcsh)
  30. # So instead, source the .login, then execute tcsh..  Oops -l starts
  31. # tcsh as login shell
  32. #
  33. set tcshpath = ~kelly/bin4/tcsh
  34. set host = `hostname`
  35.  
  36. if ($host != triton && $host != moshpit) then     # temp cluge for old OS
  37. if ($?prompt != 0 && -x $tcshpath && $shell != $tcshpath) then
  38.   #
  39.   # Spawn tcsh next time Leave this last
  40.   #
  41.   setenv SHELL $tcshpath
  42.   set shell=$tcshpath
  43. #  source ~/.login
  44.   exec $tcshpath -l
  45. endif
  46. endif
  47.  
  48.  
  49.  
  50. J Warner
  51.