With a launcher for a terminal application, how can I keep the terminal open after the program is complete?

Assuming your command is called mycommand, I'd change my launcher to run this:

gnome-terminal -e "mycommand|less"

If you want a more permanent, perhaps cleaner solution, open up gnome-terminal, go to Edit, Profile preferences and click the Title and Command tab. Change the "When command exits" option to "Hold the terminal open".

When you execute commands, it should now leave the terminal open when something runs.

Edit: If you don't really care about the terminal, you could just use xterm's hold flag:

xterm -e "mycommand" hold

Your launcher is running a script right?

At the end of your script add

read -p "Press any key to exit > " -n1 junk
echo 

Then your script will wait until you choose to end it.


In your .desktop shortcut, use this

Exec=gnome-terminal -x bash -c "YOUR_SCRIPT; exec $SHELL"

After your script is finished, the Bash process will replace itself with a new invocation of itself.

If you need to pass quoted arguments to your script, you have to escape the quotes:

Exec=gnome-terminal -x bash -c "YOUR_SCRIPT \"arg with spaces\"; exec $SHELL"