Jetson Orin AutoStart is not working



Hi,

I would love make autostart on my python code after its open. I made;

nano ~/.config/autostart/main01.desktop

[Desktop Entry]
Encoding=UTF-8
Name=myscript
Comment=myscript
Icon=gnome-info
Exec=python ~Desktop/X/lib/main01.py
Terminal=false
Type=Application
Categories=

X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=0

but this way is not working. I don’t know what is wrong because I tried evrything.

I need your help. Thank you

Hi,
There are some examples in

Jetson AGX Orin FAQ
Q: How to autorun an app or commands at startup?

Please take a look and give it a try.

Hi DaneLLL,

Thanks for respon. I check to attechment but could’nt see any realtion topic that same as me.

If you want I can give more details.

Thanks.

Hi,
These are valid examples. You may try either default example, and then apply your startup command to the example.

Hi,

Even though I tried:

sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev
gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)

Then I made a basic python code to control if its open. I will write to all I’ve done maybe someone has same problem.

nano ~/.config/autostart/emre.desktop
[Desktop Entry]
Encoding=UTF-8
Name=myscript
Comment=myscript
Icon=gnome-info
Exec=python ~Desktop/(my username)/lib/emre.py
Terminal=false
Type=Application
Categories=

X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=0

and inside at emre is just:

print("its open")

Hi,
Would suggest try to either enable rc.local or add the command to ~/.xsessionrc. There are several examples in FAQ.

Hi,

sudo nano /etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local 
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

sudo nano /etc/rc.local

#!/bin/sh -e
# rc.local

# Python script'inizi çalıştırın
python3 /home/KULLANICI_ADI/Desktop/X/lib/main01.py &

exit 0

sudo chmod +x /etc/rc.local

sudo systemctl daemon-reload

sudo systemctl enable rc-local

After I started to system its give me the error:

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
* A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
* A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
* A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
* In case of template units, the unit is meant to be enabled with some
  instance name specified.

need help thanks

Hi,
Please set exact path in the command. For example, gst-launch-1.0 has to be

/usr/bin/gst-launch-1.0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.