[NTLUG:Discuss] How to keep an xterm from closing after command is finished?

Lance Simmons lance at lsimmons.net
Sat Dec 17 00:43:26 CST 2005


* steve <sjbaker1 at airmail.net> [051217 00:17]:
> Lance Simmons wrote:
> >I want to run a command in an xterm or a gnome-terminal and keep the
> >terminal open in order to look at the results after the command is
> >finished.  How do I do it?
> 
>   xterm -hold -e mycommand
>         ^^^^^
>       Add this

Thanks.  That works, but unfortunately nautilus does not pass the
appropriate relative path to xterm.  "No absolute path found for shell"
is the error xterm gives.  Nautilus gives gnome-terminal the correct
relative path.

Fortunately, there's a roundabout way to do this in gnome-terminal.
It's not a command-line option.  You have to first create a
gnome-terminal "profile" that behaves the way you want, and then invoke
gnome-terminal with a commandline option that tells it which profile to
use.  It's a bit of a pain, but it does solve the problem.  You helped
me find the solution, because once I knew what I was looking for I
googled for "gnome-terminal hold xterm" and found someone saying the
hold option could be done in gnome-terminal via profiles.  Thanks again.

-- 
Lance Simmons




More information about the Discuss mailing list