diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Main/UserInterface.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 177a4e95..39c4274f 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -832,7 +832,7 @@ namespace VeraCrypt // MIME handler for directory seems to be unavailable through wxWidgets wxString desktop = GetTraits()->GetDesktopEnvironment(); - if (desktop == L"GNOME" || desktop.empty()) + if (desktop == L"GNOME") { args.push_back ("--no-default-window"); args.push_back ("--no-desktop"); @@ -865,6 +865,22 @@ namespace VeraCrypt catch (exception &e) { ShowError (e); } } } + else if (wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open"))) + { + // Fallback on the standard xdg-open command + // which is not always available by default + args.push_back (string (path)); + try + { + Process::Execute ("xdg-open", args, 2000); + } + catch (TimeOut&) { } + catch (exception &e) { ShowError (e); } + } + else + { + ShowWarning (wxT("Unable to find a file manager to open the mounted volume")); + } #endif } |