kbrrdk
October 17, 2024, 6:10am
1
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.
kbrrdk
October 17, 2024, 1:51pm
4
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.
kbrrdk
October 18, 2024, 6:32am
6
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.
kbrrdk
October 21, 2024, 11:13am
8
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
DaneLLL
November 6, 2024, 4:01am
10
Hi,
Please set exact path in the command. For example, gst-launch-1.0 has to be
/usr/bin/gst-launch-1.0
system
Closed
December 3, 2024, 1:58pm
12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.