Using gnome_terminal in my code runs the command I need, however it remains open even after the command has run and profile settings have been set to close after command.
while [ 1 ]
do
gnome-terminal -x bash -c "sleep 5; pkill omxplayer; pkill gnome_terminal; echo "done"; bash"
sh issfull.sh
gnome-terminal -x bash -c "sleep 2780.4; pkill omxplayer; bash"
sh nasatv.sh
done
***normal sleep time is 2780.4 which is half of the iss orbital period, but it is shortened to 5
***for testing purposes
I am aware that pkill gnome_terminal doesn't work. It was just the last idea I had to actually get this to work. My gnome_terminal profile settings are set to "When command exits: Exit the terminal" (screenshot)
and here's what happens after the command executes:
Not sure what to do from here, as you can see I've tried using bash to close it and editing the profile settings. I'm afraid to use & in order to run the process in the background because this code is made to run forever and this would likely clog up the raspberry's cpu.
Any help would be much appreciated. Apologies if this doesn't fit site guidelines or is just formatted poorly.