I have a terminal command I run from an application launcher. This works great, however sometimes the command fails, so I'd like for the terminal to stay open so I can see the results. How can I do this?
feedback
|
|
Assuming your command is called
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:
| |||||||
feedback
|
|
Your launcher is running a script right? At the end of your script add
Then your script will wait until you choose to end it. | |||||
feedback
|
|
A slightly different approach from the other answers: run your command and if that fails, then spawn a shell. This way you don't have to hold the terminal open (which doesn't distinguish between command success or failure), and you might find that shell particularly useful in failure. To close it, just use Ctrl-D (EOF), "exit", Alt-F4 (or whatever your window manager uses to close windows), etc. success-or-shell
Place this file somewhere, such as ~/bin, then use "success-or-shell your original command" in your launcher. | |||
|
feedback
|