I have written a python script that displays the image from the URL.
def image_func(link_image):
img_cmd = "feh -F %s" %(link_image)
os.system(img_cmd)
os.system("pkill feh")
If I run the python program directly using
python main.py
it runs without any issue.
But if I run from the .service file .. it throws this error.
feh ERROR: You have no HOME, cannot read themes
I am running this from the root terminal rather than the user terminal.
.service file
[Unit]
Description=My device boot script service
After=multi-user.target
[Service]
Type=idle
user=user1
Environment=DISPLAY=:0
Restart=always
ExecStart=/root/MediaPlayer/venv/Include/start.sh > /dev/null
[Install]
WantedBy=multi-user.target