From 31e475764eb818c8f816fa8913a33f4605af7441 Mon Sep 17 00:00:00 2001 From: Ave Date: Tue, 1 Dec 2020 02:09:39 +0300 Subject: [PATCH] gui: Show a warning if user does not have gui support qt gui: Split no-DISPLAY warning into two lines And add XQuartz link qt gui: Account for proxspace on no-DISPLAY warning gui: Move no-DISPLAY warning from Qt to generic code, fix bugs --- client/src/proxgui.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/proxgui.cpp b/client/src/proxgui.cpp index 525e64da6..f8dd10fa4 100644 --- a/client/src/proxgui.cpp +++ b/client/src/proxgui.cpp @@ -13,6 +13,7 @@ #include #include "proxguiqt.h" #include "proxmark3.h" +#include "ui.h" // for prints static ProxGuiQT *gui = NULL; static WorkerThread *main_loop_thread = NULL; @@ -28,8 +29,15 @@ void WorkerThread::run() { } extern "C" void ShowGraphWindow(void) { - if (!gui) + if (!gui) { + // Show a notice if X11/XQuartz isn't available +#if defined(__MACH__) && defined(__APPLE__) + PrintAndLogEx(WARNING, "You appear to be on a MacOS device without XQuartz.\nYou may need to install XQuartz (https://www.xquartz.org/) to make the plot work."); +#else + PrintAndLogEx(WARNING, "You appear to be on an environment without an X11 server or without DISPLAY environment variable set.\nPlot may not work until you resolve these issues."); +#endif return; + } gui->ShowGraphWindow(); }