FIX: when running on ssh, client would fail. see https://github.com/Proxmark/proxmark3/pull/387 (thanks @uzlonewolf)
This commit is contained in:
@@ -306,8 +306,21 @@ int main(int argc, char* argv[]) {
|
|||||||
pthread_mutex_init(&print_lock, NULL);
|
pthread_mutex_init(&print_lock, NULL);
|
||||||
|
|
||||||
#ifdef HAVE_GUI
|
#ifdef HAVE_GUI
|
||||||
|
|
||||||
|
# if _WIN32
|
||||||
InitGraphics(argc, argv, script_cmds_file, usb_present);
|
InitGraphics(argc, argv, script_cmds_file, usb_present);
|
||||||
MainGraphics();
|
MainGraphics();
|
||||||
|
# else
|
||||||
|
// for *nix distro's, check enviroment variable to verify a display
|
||||||
|
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
|
#else
|
||||||
main_loop(script_cmds_file, usb_present);
|
main_loop(script_cmds_file, usb_present);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user