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