Use flatpak-spawn in flatpak

This commit is contained in:
dec05eba
2023-04-08 07:12:45 +02:00
parent d8d0e739e7
commit e3702f147f
2 changed files with 4 additions and 2 deletions

View File

@@ -142,10 +142,10 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path, const char
const char *args[] = { server_filepath, self->socket_path, NULL };
execvp(args[0], (char *const*)args);
} else if(inside_flatpak) {
const char *args[] = { "pkexec", server_filepath, self->socket_path, NULL };
const char *args[] = { "flatpak-spawn", "--host", "pkexec", server_filepath, self->socket_path, NULL };
execvp(args[0], (char *const*)args);
} else {
const char *args[] = { "flatpak-spawn", "--host", "pkexec", server_filepath, self->socket_path, NULL };
const char *args[] = { "pkexec", server_filepath, self->socket_path, NULL };
execvp(args[0], (char *const*)args);
}
perror("execvp");