I have created a simple bash script called echo.sh. Which outputs a string. I've made sure its executable. And i then added it to the "startup applications" program through the GUI interface. However when i reboot my machine, it doesn't appear to of been executed, as there is no echo appearing in a terminal.
from my understanding shouldn't the script ,when executed, open up a terminal automatically from my understanding because of the STDOUT being the terminal file. However the script works fine if i launch it myself from the terminal.
echo.sh
#!/bin/bash echo "hello this is a bash script talking"
Making it Executable
chmod +x echo.sh
Adding to "startup applications with correct directory to file"
Outcome
However when i reboot the system, the script doesn't run as expected, and no terminal appears with the echo message. I'm unsure as to why, and i may be completely missing the point, if so please let me know.
just to note, all my other bash scripts work , such as my "cleanup.sh" script which is also in the "startup applications" program.
Attempted fixes
I've tried redirecting the STDOUT to the terminal file /dev/tty. However this doesn't seem to work.
#!/bin/bash echo "hello this is a bash script talking" >/dev/tty
I've also tested a bash script with just a simple rm command, just to check if it was just the echo command that was having a problem. However when added to start up applications or .bashrc file, it doesn't delete the test.txt in the same directory as the script. However works when i execute manually from the terminal.
#!/bin/bash rm ./test.txt
I've also tested startup applications program itself with just opening Firefox, with just the command Firefox. Which works without an issue. So their doesn't seem to be an issue with the startup applications program itself?