From owner-freebsd-questions@FreeBSD.ORG Thu Nov 25 18:18:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64D4A16A4CE for ; Thu, 25 Nov 2004 18:18:10 +0000 (GMT) Received: from nwlynx.network-lynx.net (nwlynx.network-lynx.net [63.122.185.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E05A43D67 for ; Thu, 25 Nov 2004 18:18:10 +0000 (GMT) (envelope-from Don@Silver-Lynx.com) Received: from [70.57.246.81] (helo=Silver-Lynx.com) by nwlynx.network-lynx.net with esmtpa (Exim 4.42 #1) id 1CXOCM-000OO6-HR by authid with fixed_cram; Thu, 25 Nov 2004 11:18:30 -0700 Message-ID: <41A621D6.90807@Silver-Lynx.com> Date: Thu, 25 Nov 2004 11:17:58 -0700 From: Don Wilde User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031028 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Fabian References: <41A615CE.6010405@Silver-Lynx.com> <20041125180001.GB1299@turingmachine.mentalsiege.net> In-Reply-To: <20041125180001.GB1299@turingmachine.mentalsiege.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: shell programming challenge X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 18:18:10 -0000 Adam Fabian wrote: > On Thu, Nov 25, 2004 at 10:26:38AM -0700, Don Wilde wrote: > >>Hey, folks - >> >>I need to find a way to kick off an xterm running BASH and then execute >>a program within that xterm, but NOT close the new xterm after the >>program finishes. Another desirable thing would be to also be able to >>'source in' a file of shell environment that would affect the new window >> and shell. > > > bash --rc-file \ > file_that_contains_the_environment_i_want_and_the_command_i_want_to_run > > If you mean that you want the xterm to continue running the same > instance of bash. I don't think xterms run without the benefit of a > program to emulate a terminal for. That's what I don't want to do. I could cat the rcfile and the command in a temp file, but that runs the risk of leaving junk around in /tmp. I'm actually eval'ing this command from another larger program and passing prog-to-be-run from it's argument string after a -e switch. This is to be generalized; I don't know what prog-to-be-run is going to be. -- Don Wilde ---------> Silver Lynx <---------- Raising the Trajectory of Human Development --------------------------------------------- http://www.Silver-Lynx.com