1) The user can see clearly that the script is running
2) The script can output errors that the user can see,
3) The user can terminate the script easily by shutting the terminal.
In order to achieve this, I can't just place my target script in /root/Startup - it would run ok, but not in a visible terminal. So what I am trying is to place a "starter" script in /root/Startup as follows :
Code: Select all
#!/bin/bash
sleep 5
xterm -e ./vox/targetscript -hold
(I had to put it in a subdirectory of Startup as that is the only way it seems to work)
If I click the starter script - it works perfectly. My target script gets started in a terminal, shows any output as required, and terminates when I close the terminal window. However, it does not run successfully after the boot process - I do see a terminal open up but it closes before I can see anything in it.
I've tried different sleep values in case the script was trying to start before something had "settled", but that only delayed the appearance of the self-closing terminal window.
I would like to know what it is about the boot / Startup process that causes this script to behave differently to when I just manually click it.