I have orangepi lite card and armbian in it. I have pyhon tkinter app that needs to start at boot so i write sh file for it.
#!/bin/bash
cd /folder-to-main-script
sudo python3 PinReader.py
#for the test purposes
echo "insertedtext" > file.txt
Here is my startup.sh when triggered from terminal it works perfectly. Then i added a .desktop file in /etc/xdg/autostart
[Desktop Entry]
Name=MyAppName
Exec=bash /full/path/to/working/directory/startup.sh
Type=Application
Version=1.0
It start the script on startup for sure but not the app. How can i start the tkinter program on startup.
The problem is we cant sudo on startup. We have to give
Then we can start it on startup.
Also we can add
to our python script so it runs when we call it like
We dont need to use sh file we can change the autostart file to
it'll work.