I want to run a python script file auto on startup. I am following this post and it worked perfect for desktop ubuntu but when I tried it in orangePI linux no method is working.
I tried
Method 1
Create file ~/.config/autostart/MyScript.desktop with
[Desktop Entry]
Encoding=UTF-8
Name=MyScript
Comment=MyScript
Icon=gnome-info
Exec=python /home/your_path/script.py
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=0
Method 2
and also this one
sudo cp -i ~/Desktop/test_code.py /bin
sudo crontab -e
Add the following line and save it:
@reboot python /bin/test_code.py &
Any one can guide me?