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("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

Description=My device boot script service

ExecStart=/root/MediaPlayer/venv/Include/start.sh > /dev/null


migrated from meta.askubuntu.com Aug 29 at 8:15

This question came from our discussion, support, and feature requests site for Ubuntu users and developers.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.