Desktop icons NG permission issue

Hi community,
It looks like DING cannot run apps without execute permission on .desktop files. But I can’t just chmod u+x 'cause .desktops is symlinks to read-only /nix/store.
So how to make DING works/

That sounds like an implementation flaw in DING. Desktop files are not intended to be executed directly, and (from what I know) no app launcher that implements XDG Desktop Entry support requires executable .desktop files.

In my opinion, you should report this as an issue to the developers of DING and ask them why the execute bit is required at all. This isn’t just a recommendation, it’s pretty much your only solution, because you cannot set the execute bit on these files so long as they remain symlinks to the noexec mounted /nix/store. You could definitely bypass this, but you’d be hacking together a lot of activation logic that imho isn’t worth doing for one app.

/nix/store isn’t mounted noexec, that would be extremely broken.

Also the “needing .desktop files to be executable” seems to be originally a GNOME/KDE thing not a DING thing, see https://unix.stackexchange.com/a/373246 and .desktop file security. However, as the files are owned by root, DING shouldn’t care about execute bit.

As a workaround you could fuss with pkgs.symlinkJoin but that isn’t worth it IMO especially as you add more packages. I’d probably just consider it a DING bug.

EDIT: based on gnomeExtensions.gtk4-desktop-icons-ng-ding: cannot run apps without execute bit on .desktop · Issue #459293 · NixOS/nixpkgs · GitHub, your symlink is causing this. Don’t do that.

1 Like

Woops youre right. I somehow mixed up that with nosuid :sweat_smile: