[oclug] Keeping a shell script open under KDE

Patrick Smith patsmith at pobox.com
Thu Nov 25 14:03:25 EST 2004


Hugh Campbell wrote:
> Anyone know how to set up a KDE or XFCE button to open an xterm, run a
> shell script and then NOT immediately exit, but instead leave the xterm
> open waiting for further user input?
...
> I want the xterm to open up, run the script once to tell the user what
> parameters are required, and then wait for the user to rerun the script
> with the correct parameters.

Make a secondary script with this in it:

	#!/bin/sh
	/path/to/the/real/script
	exec /bin/bash

And then set the button to run the secondary script instead of the real 
one.  This way, /bin/bash will run in the same process as the secondary 
script, so xterm won't think the script has finished until the user 
exits from bash.



More information about the OCLUG mailing list