From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cisco.com ([144.254.112.76]) by hawkwind.utcs.toronto.edu with SMTP id <76096>; Wed, 27 Feb 2002 01:18:58 -0500 Received: (from dfawcus@localhost) by cisco.com (8.8.8/2.6/Cisco List Logging/8.8.8) id GAA06993; Wed, 27 Feb 2002 06:13:02 GMT Date: Wed, 27 Feb 2002 01:13:02 -0500 From: Derek Fawcus To: Byron Rakitzis Cc: schwartz@bio.cse.psu.edu, pk@TechFak.Uni-Bielefeld.DE, rc@hawkwind.utcs.toronto.edu Subject: Re: non login "rc" needs customized environment Message-ID: <20020227061302.B5979@edinburgh.cisco.com> Mail-Followup-To: Byron Rakitzis , schwartz@bio.cse.psu.edu, pk@TechFak.Uni-Bielefeld.DE, rc@hawkwind.utcs.toronto.edu References: <200202150411.g1F4BTn06392@rakitzis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200202150411.g1F4BTn06392@rakitzis.com>; from byron@rakitzis.com on Thu, Feb 14, 2002 at 11:11:29PM -0500 On Thu, Feb 14, 2002 at 11:11:29PM -0500, Byron Rakitzis wrote: > > All I'm saying is that you don't necessarily want .rcrc to run via rsh -- > there might be stuff in there that depends on an interactive shell. Hence > the suggestion that a different mechanism be used. > > That being said, I like to use stricter rules for my personal .rcrc: > it is idempotent, so I can always issue ". .rcrc" and be sure there > won't be any nonsense in my environment. 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. In fact the above could be hidden by having a _local_ wrapper for ssh which played the above games when logging into the remote system. Alternately since ssh can pass environment strings across to the remote process, simply set the environment you need for rc at your local end and allow this to inititialise the remote rc. DF