Bug with exception handling in headless mode?

So I’m currently working on the multiplayer mode for my game using Spidermonkey. I am absolutely in love, I managed to get a Raspberry PI model 2 to run my game and host multiple players without it breaking a major sweat.

That being said, the server has no display attached to it and is running in headless mode, and I’m using SSH to do my dirty work.
This is a bit problematic, because as soon as there is an uncaught exception in the OpenGL thread, the swing error popup is created courtesy of the exception handler attached to it, spamming the terminal full of errors (no X11 display found).

I’ve actually managed to solve the problem for my own project, by setting a custom default exception handler during early startup, and enqueuing a callable right after starting the application to apply my exception handler explicitly to the opengl thread during its first update cycle.
Could headless mode be detected in the engine’s exception handler for the OpenGL thread and just print the stack trace as usual? Might save a few headaches down the road.

use
-Djava.awt.headless=true
so the jvm also knows that it is headless, should already work then.