diff --git a/display/x11.c b/display/x11.c index 7d83c437..cb89deb6 100644 --- a/display/x11.c +++ b/display/x11.c @@ -272,6 +272,10 @@ ws_init(const char *crtname, /* crt type name */ xpixels = xp; /* save screen size */ ypixels = yp; + if (getenv ("DISPLAY") == NULL) { + return 0; + } + XtToolkitInitialize(); app_context = XtCreateApplicationContext(); argc = 0;