Thread View: comp.unix.shell
1 messages
1 total messages
Started by John Ruckstuhl
Wed, 28 Nov 1990 08:04
Make remote-shell csh act as login-shell
Author: John Ruckstuhl
Date: Wed, 28 Nov 1990 08:04
Date: Wed, 28 Nov 1990 08:04
43 lines
2115 bytes
2115 bytes
I believe that generally speaking, for csh & tcsh, ~/.login should contain commands to set the terminal type and environment variables, and ~/.cshrc should contain commands to set aliases and shell variables. -- with the notable ?exception? that the path should be set in ~/.cshrc because remote-shells aren't login-shells (remote:~/.login isn't sourced). However, the logic of ~/.login being ignored for a remote-shell escapes me. I would want all of my environment variables set properly (not just PATH) and it seems wasteful to put it all in ~/.cshrc and reset everything with each subshell. I am tempted to test at the beginning of ~/.cshrc whether or not an environment variable is set which indicates that ~/.login has been sourced (the environment variable would be set within ~/.login), and if not, source it. Also, I would test at the beginning of ~/.login whether or not ~/.login has already been sourced, and avoid sourcing it again. For example: % head -1 ~/.cshrc if (! $?LOGIN) source ~/.login and % head -2 ~/.login if ($?LOGIN) exit setenv LOGIN Maybe DEPTH would be a better choice of environment variable -- perhaps I would increment it during each ~/.cshrc if I wanted to know how deep in subshells I was. Is this sane? Do others do this? If you think that I am hopelessly confused, so that you cannot easily compose a reply which corrects me, but are willing to explain to me by telephone, please email your telephone number to me. I don't think this is relevant, but we run SunOS 4.1 on SS1+'s. Thank you for your comments, ruck -- John R Ruckstuhl, Jr University of Florida ruck@cis.ufl.edu, uflorida!ruck
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads