title: Cron job: how to run a script that requires to open display?
body: <p>I want to set up a cron job to run a python script, but it gives me this error: </p>
  
  <pre><code>RuntimeError: could not open display
  </code></pre>
  
  <p>This is because I import a module that requires me to open display (<code>pylab</code>, for example). Even though my script does not generates any pictures to display on the monitor. </p>
  
  <p>Is there any way to let crontab run my jobs with display open (just as if I <code>ssh -X</code> into a machine)? I don't actually need to generate any graphs to the monitor. I just need to import my modules correctly. </p>