[chronojump] Linux permissions dialout check also accepts uucp (arch/manjaro)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Linux permissions dialout check also accepts uucp (arch/manjaro)
- Date: Thu, 13 Aug 2020 15:37:53 +0000 (UTC)
commit 790f4cf69046775192e8bb54a9e268c9a498ecf8
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Aug 13 17:37:10 2020 +0200
Linux permissions dialout check also accepts uucp (arch/manjaro)
src/chronojump.cs | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 76d7aa32..7d47ee95 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -583,8 +583,8 @@ public class ChronoJump
LogB.SQL("all SQL done! starting Chronojump");
string topMessage = "";
- if(operatingSystem == UtilAll.OperatingSystems.LINUX && ! linuxUserHasDialout())
- topMessage = Catalog.GetString("Need dialout permissions to read from device.") +
"\n" +
+ if(operatingSystem == UtilAll.OperatingSystems.LINUX && ! linuxUserHasPermissions())
+ topMessage = Catalog.GetString("Need permissions to read from device.") + "\n" +
Catalog.GetString("Check software page on Chronojump website");
bool showCameraStop = (ExecuteProcess.IsRunning3 (-1,
WebcamFfmpeg.GetExecutableCapture(operatingSystem)));
@@ -592,15 +592,16 @@ public class ChronoJump
new ChronoJumpWindow(progVersion, progName, runningFileName, splashWin, sendLog,
messageToShowOnBoot, topMessage, showCameraStop);
}
- private bool linuxUserHasDialout()
+ private bool linuxUserHasPermissions ()
{
- LogB.Information("Finding dialout:");
+ LogB.Information("Finding dialout or uucp:");
string executable = "groups";
ExecuteProcess.Result execute_result = ExecuteProcess.run (executable, true, true);
if(execute_result.success)
{
LogB.Information(execute_result.stdout);
- return (execute_result.stdout.Contains("dialout"));
+ return (execute_result.stdout.Contains("dialout") || //debian based
+ execute_result.stdout.Contains("uucp")); //arch/manjaro
}
//if script has failed, don't bother the user
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]