Debugging Programmatically Opened Terminals in Gnome

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

If you are building something that is opening a terminal, perhaps a fancy URL handler or something similar but there are errors causing the terminal to instantly close, then this is the solution for you.

It’s actually really simple!

Create a new profile

Select the “Title and Command” tab

at the bottom there is an option “when command exits”

You can switch this to “Hold Terminal Open” which will keep the terminal open so you can see the error message and then fix it

You need to add the following flag to your gnome-terminal launcher:


gnome_terminal --window-with-profile={profile_name}

Beautiful!