I want to set up a cron job to run a python script, but it gives me this error:
RuntimeError: could not open display
This is because I imp
You could also run your application in a framebuffer using xvfb or a similar tool:
or sudo apt-get install xvfb
Usage:
xvfb :1 -screen 0 800x600x8 & # WIDTHxHEIGHTxCOLORDEPTH
export DISPLAY=":1"
java application_name.jar
or shorter:
xvfb-run -a -e /tmp/some/log/file.log /home/user/application.run
-a chooses a display number automatically, -e file specifies a logfile for error messages.