Compare commits

...

1 Commits

Author SHA1 Message Date
Jonas Letzbor 6f12dec170
Use correct 'XAUTHORITY' env variable
Gitea/Java-Installer/pipeline/head This commit looks good Details
2024-02-11 21:08:19 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -124,8 +124,8 @@ public class RunInConsole {
Process proc = new ProcessBuilder(
"pkexec", "--user", "root",
// By default, the command started by pkexec will run in a minimal and safe environment. This does NOT include the $DISPLAY variable by default.
// Because the most terminal needs this (and the XAUTH), we use the env command
"env", "DISPLAY=" + System.getenv("DISPLAY"), "XAUTH=" + System.getenv("XAUTH"), "HOME=" + System.getenv("HOME"),
// Because the most terminal needs this (and the XAUTHORITY), we use the env command
"env", "DISPLAY=" + System.getenv("DISPLAY"), "XAUTHORITY=" + System.getenv("XAUTHORITY"), "HOME=" + System.getenv("HOME"),
"/bin/sh", "-c",
terminal + " " + terminalCommand + " /bin/sh -c 'java -jar \"" + executableName + "\" " + strArgs
+ (keepOpen ? "; exec sh'" : ";")