Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!cwjcc!ukma!gatech!bloom-beacon!DSYS.NCSL.NIST.GOV!rbj From: rbj@DSYS.NCSL.NIST.GOV (Root Boy Jim) Newsgroups: comp.windows.x Subject: Preventing random ^D's (EOFs) from killing console xterms Message-ID: <8907201551.AA14997@dsys.ncsl.nist.gov> Date: 20 Jul 89 15:51:35 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: National Institute of Standards and Technology formerly National Bureau of Standards Lines: 36 ? From: earle@jpl.nasa.gov (Greg Earle) ? Normally I like to be able to use ^D (UNIX EOF) to kill/exit shells, so ? I don't set the `ignoreeof' csh/tcsh variable unless I'm in a login shell. ? I have checks in .cshrc to prevent this (I keep track of the shell depth ? via a variable). Well, I disagree violently on that point. Ignoreeof should always be set. But, it takes all kinds, so read on. They way to distinguish a `login shell' is by whether it sources .login. The `-ls' option to xterm is available for this purpose. Use it with the `-C' option on your console shell. Of course, all my xterms use this option, since I consider each window to be a separate login, so that doesn't help you if you do that. In any case, since you are using .xinitrc, and environment variables are inherited, just precede your console xterm with setenv IAmAnXLoginShellPleaseSetIgnoreeof Your .login (or .cshrc if you must) would contain if ($?IAmAnXLoginShellPleaseSetIgnoreeof) then set ignoreeof endif unsetenv IAmAnXLoginShellPleaseSetIgnoreeof Well, you probably should use a shorter name, but you get the idea. ? Disclaimer: Don't even THINK that my postings represent the company I work for. ? - Greg Root Boy Jim Have GNU, Will Travel.