X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/067bfc8b762f86d5ebb65ecca9e1ba3a304ecd84..2ce43a28f7f7fb1c6f3c091f31d5cc4f68f36082:/client/proxmark3.c diff --git a/client/proxmark3.c b/client/proxmark3.c index fa389dd1..956eb6a8 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -274,8 +274,22 @@ int main(int argc, char* argv[]) { pthread_mutex_init(&print_lock, NULL); #ifdef HAVE_GUI +#ifdef _WIN32 InitGraphics(argc, argv, script_cmds_file, usb_present); MainGraphics(); +#else + char* display = getenv("DISPLAY"); + + if (display && strlen(display) > 1) + { + InitGraphics(argc, argv, script_cmds_file, usb_present); + MainGraphics(); + } + else + { + main_loop(script_cmds_file, usb_present); + } +#endif #else main_loop(script_cmds_file, usb_present); #endif