I’ve browsed through multiple threads on this topic, but I’m still quite confused (and many of them are unsolved or updated only with further problems). I’m hoping someone can help me out on what seemed at first like a simple issue…
I am using JetPack4.2.1, flashed from Ubuntu 16.04… Let me know if additional info is needed please.
I have a Python program that takes information from a camera connected by USB and runs a GUI. I would like that program to open automatically, without input from the user, after the board powers on.
Adding regular programs to the Start Up Applications menu (Chromium or Solitaire, for example) seems to work fine, simply by clicking Add and typing in the command for the program. I’ve tried adding mine that way, and I’ve also tried adding it with “sleep 50” beforehand thinking maybe it was booting too soon, but no luck.
What can I do to make the GUI open automatically?
These are the threads I tried looking at:
And this one seemed the most promising:
but not quite sure I follow.
From these, I tried writing the following script:
#! /bin/sh sleep 20 python3 <path to program> @reboot sleep 20 && python3 <path to program>
and then inserting it into the folder /etc/init.d/ but nothing happened.
Hoping someone can point out my mistake or give me some better advice :(
Edit to add -
I also tried adding the line that runs the script to the file in /etc/profile.d as suggested here:
but didn’t work. Another answer there suggest adding to the folder /etc/rc.local, but that doesn’t seem to exist on my board…