OK, I know the title doesn’t quite explain my question, so let me clarify this: I have set gnome-terminal to close after a command has been executed. I like it that way. The thing is - it closes after some commands but it remains open after other commands. Since some commands are insanely long, I’ve put them in scripts (‘.sh’ files) and here’s the weird part: the script for making a backup of thunderbird settings runs its course and then gnome-terminal exits, as it should be. But the script to create a backup of my megamod for Scania Streamline (Euro Truck Simulator 2) runs its course and gnome-terminal remains open indefinitely. Why is that? What is it that’s keeping it open when it SHOULD exit?
I must note that this started happening recently, like 2-3 months ago. I’ve been using these scripts for a few years already and never had a case where gnome-terminal would remain open after executing the command in the script.
At first I thought what kept the terminal open was the Scania script’s header: #!/bin/bash, so I removed it from the sh file but that didn’t change anything and the Scania script still keeps Gnome Terminal open and running, even after the task has been completed.
Here are the two scripts - for thunderbird and for Scania, cuz I have a feeling you’ll ask for their content. They’re basically normal terminal commands put together in a single file for conveniency and for using as aliases.
The thunderbird backup script:
rm -v /media/1000GB/PROGRAMS/INTERNET/BROWSERS/THUNDERBIRD/thunderbird-config.7z && profile-cleaner t && 7z a /media/1000GB/PROGRAMS/INTERNET/BROWSERS/THUNDERBIRD/thunderbird-config.7z .thunderbird -mx=0 -mmt=8
The Scania backup script:
rm -v "/media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z" && cd /media/1000GB/GAMES_1000/ETS2_Linux_146_MODS_and_SAVES/mod && 7z a "/media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z" "Scania Streamline v1.5.6 - EU3 sound + Supergirl/" -mx=0 -mmt=8
[rado@arch]: ~>$ gnome-terminal --version # GNOME Terminal 3.48.2 using VTE 0.72.2 +BIDI +GNUTLS +ICU +SYSTEMD