GNOME Bugzilla – Bug 305704
terminal closes after executing command
Last modified: 2005-07-29 19:46:35 UTC
Please describe the problem: I am in Ubuntu, for starters. I wanted to add a menu item on the main menu (the lil foot) that would open a gnome-terminal, execute a help for a command, and leave the user of the item with the help listed and a bash shell prompt. Sample commands used: gnome-terminal -e 'ls --help;bash -i' gnome-terminal -x 'ls --help;bash -i' The gnome-terminal appears for a millisecond and then disappears as soon as the command is executed. Usually this is the desired outcome of the command however. The alternatives: Use xterm - xterm -e 'ls --help;bash -i' Create a profile in gnome-terminal and set the help command to execute when the terminal is opened using that profile. You then can: gnome-terminal -window-with-profile=PROFILENAME The former makes me resort to another program due to lack of functionality in gnome-terminal. The latter lacks all elegance. gnome-terminal really should have this functionality. Steps to reproduce: 1. gnome-terminal -e 'ls --help;bash -i' 2. gnome-terminal -x 'ls --help;bash -i' Actual results: gnome-terminal is run, and as soon as the commands within the ''s are completed, the window closes. Expected results: With bash -i it should remain open after executing the first command (ls --help). It closes down immediately instead. Does this happen every time? Yes. Other information: It works in xterm, it doesn't work in gnome-terminal.
I second this proposal. The user does not expect the window to close directly after the command has been run, especially not when activating "run in terminal" in Gnome's "run command" dialog.
I'll try to take a look at this and see what would need to be changed for this to work. For now you can work around it with: gnome-terminal -e 'sh -c "ls --help;bash -i"'
*** This bug has been marked as a duplicate of 163148 ***