Selenium No Display Specified

Post image for Selenium No Display Specified

by Mark Shead on June 2, 2010

I was using Selenium to automate some tasks beyond testing and needed to set it up to run with a cron job. A shell script calls the appropriate Maven command, but I kept getting the error:
Error: no display specified

The fix was to add this to the script before calling Maven:
export DISPLAY=:0

Evidently when Selenium is started from cron, it doesn’t know what display to use. This code tells it to use display 0 and it runs normally.

People Found This When Looking For:

  • Error: no display specified (339)
  • selenium Error: no display specified (118)
  • selenium no display specified (56)
  • no display specified (42)
  • error no display specified (42)
  • Error: no display specified selenium (28)
  • selenium cron (18)
  • selenium error no display specified (18)
  • error no display specified selenium (17)
  • selenium no display (11)

Leave a Comment

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Previous post:

Next post: