1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Linux: Support checking/reparing mounted filesystem on KDE when xterm not available

This commit is contained in:
Mounir IDRASSI
2015-07-04 17:38:57 +02:00
parent 218f63b4b6
commit c3b77fba25

View File

@@ -61,6 +61,31 @@ namespace VeraCrypt
{ {
Process::Execute ("xterm", args, 1000); Process::Execute ("xterm", args, 1000);
} catch (TimeOut&) { } } 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 void CoreUnix::DismountFilesystem (const DirectoryPath &mountPoint, bool force) const