I am working with Ubuntu 16.04 on an NVIDIA TX2 system and have a shell script launcher.sh containing the following commands:
#!/bin/sh
cd /home/nvidia
sudo python test.py >> /home/nvidia/test_output.txt,
basically implying to store the output of test.py in test_output.txt.
The test.pyhas one line: print "Testing startup script!"
I want this script (and more complicated scripts later on) to run automatically when the system boots up. To this end, I added it to the Startup Applications with the command /home/nvidia/launcher.sh and rebooted the system. The file test_output.txt is indeed created but there is no output written in it. I tested the script from the terminal and it works fine. 
How do I make this to work from Startup Applications?
 
    