From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hawk.mail.pas.earthlink.net ([207.217.120.22]) by hawkwind.utcs.toronto.edu with SMTP id <76096>; Wed, 27 Feb 2002 01:34:22 -0500 Received: from user-vcaunld.dsl.mindspring.com ([216.175.94.173] helo=rakitzis.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16fxb3-00076b-00; Tue, 26 Feb 2002 22:29:49 -0800 Received: (from byron@localhost) by rakitzis.com (8.11.0/8.11.0) id g1R6TV429512; Tue, 26 Feb 2002 22:29:31 -0800 Date: Wed, 27 Feb 2002 01:29:31 -0500 From: Byron Rakitzis Message-Id: <200202270629.g1R6TV429512@rakitzis.com> To: byron@rakitzis.com, dfawcus@cisco.com Subject: Re: non login "rc" needs customized environment Cc: pk@TechFak.Uni-Bielefeld.DE, rc@hawkwind.utcs.toronto.edu, schwartz@bio.cse.psu.edu > Add a flag (say -S) which when used as 'rc -S file' will act as if ". file" > had been the first command executed. I've been thinking of hacking this > into my copy of rc, just so that when starting xterms I can be lasy and > forgo typing '. .rc/interactive' into every new shell. > This could then be used with "ssh -t host 'rc -S startup_file'" from the > originating host if a specific environment set up is required. I quite > _like_ the fact that I can get an virgin environment when logging in > remotely. I am not sure I understand the ssh problem described here. My understanding was that this is a problem with NON-interactive shells. As long as you are willing to play games with wrappers and so on and so forth, why not simply do: rsh foo 'rc -c ''. .rcrc; '$^cmd'''' Incidentally, a good way of getting an interactive shell to do something just once, e.g., when starting a new xterm, is to set fn prompt as follows: fn prompt { fn prompt # remove myself from the environment one-time init stuff } This works differently from .rcrc because it could be, for example, that your .xinitrc runs rc as a login shell, but only when a subshell finally prints a prompt do you do things like set a terminal type, etc. Byron.