Date: Wed, 03 Dec 2008 10:50:03 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: "Aggelidis Nikos" <aggelidis.news@gmail.com> Cc: Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org Subject: Re: open multiple xterms with script Message-ID: <87wsehprr8.fsf@kobe.laptop> In-Reply-To: <30fc78250812022358v1970b4f6x6a1d6b3c9ca8f0c8@mail.gmail.com> (Aggelidis Nikos's message of "Wed, 3 Dec 2008 09:58:52 %2B0200") References: <30fc78250812020007h22ab0dc4if044e46b4f36b00c@mail.gmail.com> <20081202093544.a5cb8a21.freebsd@edvax.de> <30fc78250812022358v1970b4f6x6a1d6b3c9ca8f0c8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Dec 2008 09:58:52 +0200, "Aggelidis Nikos" <aggelidis.news@gmail.com> wrote: > Thank you for your help! > > some additional questions: > > 1) is there any way to give the root password once? i tried this: > #!/bin/sh > > su root -c "\ > xterm -geometry 80x25 -title 'App 1' -e 'app1' & > xterm -geometry 80x25 -title 'App 2' -e 'app2'\ > " > > but i get this: > xterm Xt error: Can't open display: %s su doesn't preserve the DISPLAY environment variable, so you can use one of the following: sudo bash -c "xterm & xterm &" su root -c "DISPLAY=$DISPLAY ; export DISPLAY ; xterm & xterm &" > i don't think i need something so complex. Is there any way to > instruct xterm not to close after the execution of the program? I'm not sure. It may be possible to play shell-specific tricks that cause `app1' to be executed as part of the shell's startup scripts.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87wsehprr8.fsf>