diff options
Diffstat (limited to 'src/firecfg/main.c')
-rw-r--r-- | src/firecfg/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firecfg/main.c b/src/firecfg/main.c index 19f2573f3..0c81f69bd 100644 --- a/src/firecfg/main.c +++ b/src/firecfg/main.c | |||
@@ -443,11 +443,15 @@ int main(int argc, char **argv) { | |||
443 | } | 443 | } |
444 | 444 | ||
445 | if (arg_guide) { | 445 | if (arg_guide) { |
446 | int status = system("sudo "LIBDIR "/firejail/firejail-welcome.sh zenity " SYSCONFDIR); | 446 | char *cmd; |
447 | if (asprintf(&cmd, "sudo %s/firejail/firejail-welcome.sh /usr/bin/zenity %s %s", LIBDIR, SYSCONFDIR, user) == -1) | ||
448 | errExit("asprintf"); | ||
449 | int status = system(cmd); | ||
447 | if (status == -1) { | 450 | if (status == -1) { |
448 | fprintf(stderr, "Error: cannot run firejail-welcome.sh\n"); | 451 | fprintf(stderr, "Error: cannot run firejail-welcome.sh\n"); |
449 | exit(1); | 452 | exit(1); |
450 | } | 453 | } |
454 | free(cmd); | ||
451 | 455 | ||
452 | // the last 8 bits of the status is the return value of the command executed by system() | 456 | // the last 8 bits of the status is the return value of the command executed by system() |
453 | // firejail-welcome.sh returns 55 if setting sysmlinks is required | 457 | // firejail-welcome.sh returns 55 if setting sysmlinks is required |