gr: detect the presence of the GUI on Mac OS X

Fail if there is no GUI present.
gr: send error to stderr, not stdout