James Bond James Bond - 1 year ago 83
Linux Question

Python - Crontab script not showing Pillow Images

My crontab is

@reboot /home/cin/new.sh

In new.sh I have

python3 new.py

In new.py I open images with the Pillow module and play music, but when I boot it only plays the music. Any help is appreciated.

EDIT: The music plays perfectly.

Edit: The shell script runs it fine in terminal.


Answer Source

In the bash script, write export DISPLAY=":0.0.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download