Auto start python GUI app in Ubuntu startup

52 views Asked by At

I have been written a python code by cv2 to select videocapture 0 and blur something appears in the video ouput then show the new output with img show in Ubuntu, it works fine by running the script manually but when I want to make it run automatically when ubuntu startup and I want to raise the audio that was coming from the videoCapture how can I do that.

I tried to run it using systemctl by creating file.service in /etc/systemd/system with this code

[Unit]

Description=hashcode



[Service]

Type=simple

ExecStart=/root/run.py

Restart=always

RestartSec=1s

User=root



[Install]

WantedBy=multi-user.target

But it's not working

0

There are 0 answers