diff options
Diffstat (limited to 'src/Main/Unix/Main.cpp')
-rw-r--r-- | src/Main/Unix/Main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main/Unix/Main.cpp b/src/Main/Unix/Main.cpp index 39a2eaba..ffc71a8d 100644 --- a/src/Main/Unix/Main.cpp +++ b/src/Main/Unix/Main.cpp @@ -49,61 +49,61 @@ int main (int argc, char **argv) try { CoreService::ProcessElevatedRequests(); return 0; } catch (exception &e) { #ifdef DEBUG SystemLog::WriteException (e); #endif } catch (...) { } return 1; } // Start core service CoreService::Start(); finally_do ({ CoreService::Stop(); }); // Start encryption thread pool EncryptionThreadPool::Start(); finally_do ({ EncryptionThreadPool::Stop(); }); #ifdef TC_NO_GUI bool forceTextUI = true; #else bool forceTextUI = false; #endif #ifdef __WXGTK__ - if (!getenv ("DISPLAY")) + if (!getenv ("DISPLAY") && !getenv ("WAYLAND_DISPLAY")) forceTextUI = true; #endif // Initialize application if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0))) { Application::Initialize (UserInterfaceType::Text); } else { #if defined (TC_MACOSX) && !defined (TC_NO_GUI) if (argc > 1 && !(argc == 2 && strstr (argv[1], "-psn_") == argv[1])) { ProcessSerialNumber p; if (GetCurrentProcess (&p) == noErr) { TransformProcessType (&p, kProcessTransformToForegroundApplication); SetFrontProcess (&p); } } #endif Application::Initialize (UserInterfaceType::Graphic); } Application::SetExitCode (1); // Start application if (::wxEntry (argc, argv) == 0) Application::SetExitCode (0); } |