Hello! I’m currently trying to make a small app that needs to access the filesystem to manage AppImages files (to make them less annoying).
I am new to Gnome app dev ; Sorry in advance if this isn’t the right place or if I’m not following all community standards
I’m having an error however when I try to open the File Dialog :
Failed to create D-Bus proxy: Could not connect: No such file or directory
Here is the code snippet in question (with debug logging)
handleAppimageOpen() {
console.log("OPENING FILE DIALOG!")
const filters = Gio.ListStore.new(Gtk.FileFilter.$gtype);
filters.append(new Gtk.FileFilter({
name: _("AppImages"),
mime_types: ["application/vnd.appimage"]
})
);
let file_dialog = new Gtk.FileDialog({
modal: true,
title: _("Open File"),
filters
})
file_dialog.open_finish = (file) => {
if(file == null) {
console.log("I GOT NO FILE! TODO : ERROR MESSAGE PLZ")
return;
}
console.log("I GOT A FILE!")
console.log(file.peek_path());
this._path_output.set_label('Path : ' + file.peek_path());
}
file_dialog.open(this, new Gio.Cancellable(), null)
}
I have tried to read the documentation but I haven’t been able to find anything relating to this error on the internet…