VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Unix
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-04 17:38:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-04 17:48:20 +0200
commitc3b77fba25539c433c882d980169f2c68329e996 (patch)
tree3338ce16f06f5411a3e86bc3d433b5fc8fb4ea68 /src/Core/Unix
parent218f63b4b613f9d5034e715bc25b2449129d0097 (diff)
downloadVeraCrypt-c3b77fba25539c433c882d980169f2c68329e996.tar.gz
VeraCrypt-c3b77fba25539c433c882d980169f2c68329e996.zip
Linux: Support checking/reparing mounted filesystem on KDE when xterm not available
Diffstat (limited to 'src/Core/Unix')
-rw-r--r--src/Core/Unix/CoreUnix.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp
index a6d1236a..73439a4a 100644
--- a/src/Core/Unix/CoreUnix.cpp
+++ b/src/Core/Unix/CoreUnix.cpp
@@ -61,6 +61,31 @@ namespace VeraCrypt
{
Process::Execute ("xterm", args, 1000);
} catch (TimeOut&) { }
+#ifdef TC_LINUX
+ catch (SystemException&)
+ {
+ // xterm not available. Try with KDE konsole if it exists
+ struct stat sb;
+ if (stat("/usr/bin/konsole", &sb) == 0)
+ {
+ args.clear ();
+ args.push_back ("--title");
+ args.push_back ("fsck");
+ args.push_back ("--caption");
+ args.push_back ("fsck");
+ args.push_back ("-e");
+ args.push_back ("sh");
+ args.push_back ("-c");
+ args.push_back (xargs);
+ try
+ {
+ Process::Execute ("konsole", args, 1000);
+ } catch (TimeOut&) { }
+ }
+ else
+ throw;
+ }
+#endif
}
void CoreUnix::DismountFilesystem (const DirectoryPath &mountPoint, bool force) const