Replace X11, headless exception by a test and log.trace
Merge pull request #527 from nicolas-f/fix/headless-error

Replace X11, headless exception by a test and log.trace