I have an automated test that I run with the xterm -e command:

xterm -e  RunMyTests

At the end of the test-run, it prints out a summary of the results and some statistics to stdout.

I'd like to have the xterm remain open and visible so I can check the results.
(if its inactive, that's fine, so long as I can see it)

I know I could manually start the xterm then run the tests there.
Or I could redirect the test-output to a file to be examined later.
Or I could run the tests in the current xterm, instead of spawning a new window.
All of these could work, but are not ideal.

Is there a way to get an xterm window to stay open after its completed its work?

link|improve this question
The problems is that there is no shell running in the xterm for it to go back to when the tests are done. I imagine there is a way to get bash to execute RunMyTests and remain open afterwards, but I can't find it off hand. Hrm. – user606723 Dec 1 '11 at 19:47
I don't even care if anything remains running. I just want the window to stay visible (and eventually close when I hit the 'X' button) – abelenky Dec 1 '11 at 19:49
There has to be something running or the terminal will close. I am pretty sure thats just how it works. – user606723 Dec 1 '11 at 19:52
feedback

2 Answers

up vote 2 down vote accepted

The problem is that there is no shell running in the xterm for it to go back to when the tests are done.

Try this.

xterm -e "echo hi;bash"

Or

xterm -e "echo hi;read"
link|improve this answer
Thanks for an excellent answer. Simple, easy to understand, and 100% effective! – abelenky Dec 1 '11 at 19:59
feedback

From xterm(1):

   -hold   Turn on the hold resource, i.e.,  xterm  will  not  immediately
           destroy  its  window when the shell command completes.  It will
           wait until you use the window manager to destroy/kill the  win‐
           dow,  or  if you use the menu entries that send a signal, e.g.,
           HUP or KILL.
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.