GNOME Bugzilla – Bug 324407
Keep terminal open when chosing 'run in terminal'
Last modified: 2021-06-10 16:22:54 UTC
Hi, currently when you click on a script and you chose 'run in terminal' it immediately closes after the exit. However the window should stay open because: 1) when you select 'run in terminal', you want to see the output of the script. Else you could run it without a terminal right? 2) on error the window closes immediately and you cannot see any error messages. In use case 1) I could add a read at the end of the script. This will not work here. There could also be an option 'keep window open', but I cannot think about a case where you want the terminal to close immediately when the script exits. What do you think about this? Other information:
I fully agree: I can't think of use-cases where one would like the terminal to close immediately. But there are still two options: 1.) At end of script let the terminal window open but don't permit the user to write stuff in it (Behaviour used by Microsoft Windows) 2. and better IMO) Just act as if one opened a gnome-terminal and wrote ./scriptname, letting the terminal open and fully functional at the end of the script.
Can be done by forcing the option 'When command exists' to 'Hold the terminal open'. However this isn't always valid. If I run a curses application (Mutt) I do not want the terminal to stay open.
I haven't thought about apps like mutt, but I still think some way to keep the terminal open is needed. There is no easy way to achieve this. Adding an option, instead of assuming you always want the window to stay open, is fine too. However Enrico's suggestion 1 means only an extra key press for mutt users. :)
Confirmed. Needs command line option and libgnome/gio needs to use that when launching with terminal? Or perhaps wontfix since it's impossible to tell whether to keep open or not from the launcher...
*** Bug 554248 has been marked as a duplicate of this bug. ***
I see this feature request was opened almost 3 years ago. Is this something that the GNOME development team intends to implement? With regard to Christian Persch's comment: Couldn't you simply make the default behavior to be what it is now and if the user specified an option, then it would remain open? Examples: xterm -hold kconsole --noclose
Dupe of bug 491807 ? (Well, it's the inverse, but bug 491807 contains a patch).
Mostly a dup, yes. But comment 3 + 4 has a point that needs to be adressed, I think.
*** Bug 613785 has been marked as a duplicate of this bug. ***
*** Bug 682130 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/3309.