Different emulators have different capabilities and protocols for the hold open feature. Some simply will not/can not do this. Others require the script to specify that the emulator remain open. I ran into this when writing a simple script for a program called HDSentinel. Here are the various solutions I can up with:
KDE (Konsole emulator)
konsole -hold -e sudo ./HDSentinel
-hold is the parameter needed)
Enlightenment (Terminology emulator)
terminology --hold -e "sudo ./HDSentinel"
--hold is the parameter needed)
XFCE (XFCE4 emulator)
xfce4-terminal -H -x "sudo ./HDSentinel"
-H is the parameter needed;)
EDIT: -x is used instead of -e in xfce terminal
Mate (mate-terminal emulator)
mate-terminal --window-with-profile=HoldOpen -e "sudo ./HDSentinel"
(with this emulator you must first create a custom profile to hold the emulator open, I called mine HoldOpen, but any name will do)
Gnome (gnome-terminal emulator)
gnome-terminal --window-with-profile=HoldOpen -e "sudo ./HDSentinel"
(works the same as Mate, create profile to hold emulator open)
lxterminal emulator that comes with LXDE does not support holding the terminal open
So the bottom line is some emulators will support hold open, and some will not. Of those that do, how you enable that feature will vary. If you are looking at an emulator not listed here, you'll have to google the emulator to find out if/how you enable hold open.
If the emulator you have does not support hold open at all, you may find your distro does include an alternate emulator that does support it (many distros include xterm as well as their desktop version emulator). If you do not have an emulator that supports hold open, you can always got get one from the software repository.
This info represents quite a bit of research time, so I hope this will help folks save some time and frustration. BTW, xterm also uses the
-hold parameter, so I believe that
;bash will serve to hold open an emulator that offers a parameter for the hold open feature. But that it will not create a hold open feature if the emulator does not support this (as in the case of lxterminal) or enable hold open if that emulator uses a custom profile to enable hold open (as in the case of Gnome).