Make sure the graphics environment isn't headless