I just installed an IDE extension that runs the current program in a terminal, and I have Gnome Terminal set to stay open when the command exits, but when that happens, the first two lines are covered up by the message "The child process exited normally with status 0". How could I move it?
I believe this is possible by editing a Gnome stylesheet, but I'm not sure where to start.
Example
Here's a simple Python script:
#!/usr/bin/env python3
x = input('Enter something: ')
print('You entered:', x)
I run it and type something:
(My system is in French.)
Then as soon as I press Enter, the script exits and the message pops up, blocking the output:
I'd rather have the message somewhere else, like at the bottom for example. Here's a mockup:
You can reproduce the issue by saving the script as tmp.py
then running gnome-terminal -- python3 tmp.py
. And make sure you have Gnome Terminal set up correctly: go to Edit → Preferences → Command → When the command exits and select Hold the terminal open.
Possible workarounds
- Make the program hold the terminal open, e.g.
input('Press Enter to finish...')
. -- I'd rather not have to put that on everything I write. - Use an integrated IDE terminal. -- I haven't found a good one yet, and I prefer using the native terminal for most things.
- Relaunch the program after it exits. -- If it has any side-effects, that might be bad, for example if it reads and writes any files.
0 Answers