--- truecrypt/main/unix/main.cpp 2018/04/24 16:49:09 1.1 +++ truecrypt/main/unix/main.cpp 2018/04/24 16:50:33 1.1.1.2 @@ -54,8 +54,14 @@ int main (int argc, char **argv) CoreService::Start(); finally_do ({ CoreService::Stop(); }); + bool forceTextUI = false; +#ifdef __WXGTK__ + if (!getenv ("DISPLAY")) + forceTextUI = true; +#endif + // Set user interface type - if (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0)) + if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0))) Application::Initialize (UserInterfaceType::Text); else Application::Initialize (UserInterfaceType::Graphic);