Get default app *.desktop with snaps


I’ve got a problem with GS extension New Mail Indicator and Thunderbird snap.

// get the default email client
    _find_default_client() {
        this.app_filename = ByteArray.toString(GLib.spawn_command_line_sync("xdg-mime query default x-scheme-handler/mailto")[1]).slice(0,-1); = Shell.AppSystem.get_default().lookup_app(this.app_filename);
        if ( {
            this.app_name =;
        } else {
            Main.notify("New Mail Indicator: error, no email client found");

My system find this.app_filename=“thunderbird.desktop” but there’s no thunderbird.desktop file so is null.
How can I get the thunderbird snap app GJS object?

this question would be better suited on

1 Like