I am trying to use my Jetson Nano 2GB as an embedded system and run a couple of scripts automatically upon startup. Currently, the Jetson requires me to click “Login” despite disabling the password and trying to enable auto-login. Is there a better/simpler way to use the Nano as an embedded system than to simply have it run a program on startup with the full-fledged ubuntu system? Also, how do I enable auto-login with the Jetson system?
Someone else could help with the automatic login issue, not sure about the steps for that, but others here have run into that need/issue.
Whether or not you can run a program without a logged in user (especially in a GUI environment) depends on whether the program itself can run without this. Does your program require a GUI (e.g., perhaps it displays on a monitor)? Many cases of using CUDA also apply for that case.
If the program does not require a GUI, then it is fairly trivial. The technically correct method would be to create a
systemd unit file (easy to do, just a short text-based file with some config information), or one could enable
rc.local (which is even easier) and put the script in the
rc.local file for starting it.
If the program does require the GPU (for most cases), then you could use either of those methods above to start a “virtual” GUI. Then no user would need to be logged in, and the program would not care that the program is virtual instead of having a physical monitor (you could use remote desktop software to then view the GUI from any computer with the right client).
You’ll need to describe more about how the program uses the GPU, whether you want a GUI displayed, if the program runs as root or some other non-root user, so on.
The program does not require a GUI, I will look into those solutions. Thanks!
If you want to enable
rc.local, then create this file, owned by root:
(possibly the file is already there)
Content for a new file would be something like this:
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# By default this script does nothing.
# Your command goes here...
Then, to activate this file as a service:
sudo systemctl enable rc-local
Oh nice. How are you connecting to the unit if it is embedded? SSH?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.