After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 305704 - terminal closes after executing command
terminal closes after executing command
Status: RESOLVED DUPLICATE of bug 163148
Product: gnome-terminal
Classification: Core
Component: general
2.10.x
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-27 22:41 UTC by Nathan Sutton
Modified: 2005-07-29 19:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Nathan Sutton 2005-05-27 22:41:06 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.
Comment 1 Malte 2005-06-10 10:05:16 UTC
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.
Comment 2 Michele Baldessari 2005-06-11 21:24:30 UTC
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"'
Comment 3 Michele Baldessari 2005-07-29 19:46:35 UTC

*** This bug has been marked as a duplicate of 163148 ***