There was an error while loading. Please reload this page.
1 parent b465227 commit 1ffe5aaCopy full SHA for 1ffe5aa
main.vala
@@ -8,6 +8,23 @@ static HeaderBar header_bar; // Too new to assume it is there?
8
9
static string selected_file;
10
11
+static string root(){
12
+
13
+var a = Posix.system("pkexec --disable-internal-agent echo hello to appimages");
14
+if (a == 32256){
15
+return "false";
16
+}
17
+else{
18
+return "true";
19
20
21
22
+static void root_run(){
23
+if(root() == "false"){
24
+Posix.exit(0);
25
26
27
28
/* Open file */
29
static void open_file(string filename) {
30
selected_file = filename;
@@ -46,6 +63,7 @@ static void on_about_clicked() {
46
63
}
47
64
48
65
static void main (string[] args) {
66
+root_run();
49
67
init (ref args);
50
68
if(args.length > 1){
51
69
open_file(args[1]);
0 commit comments