I’d like to put .desktop files in arbitrary folders. Nautilus won’t launch the application when I double click on the .desktop file.
I understand the security reasons for this so don’t want the system “wide open.” However, I wondered if the set of trusted folders was hard coded or if it can be configured by the user or admin? I couldn’t see anything when poking around dconf, but if it is possible, please could someone point me to the documentation?
I don’t understand, why would this possibly be useful? A desktop file is trusted if it is installed, e.g. into /usr/share/applications or ~/.local/share/applications. If it’s not installed, it’s surely not trusted. And if it’s installed, then you can execute it using your desktop, not the file manager.
Why not just install the desktop file if you want to execute it? cp ~/.local/share/applications/ and move on?
Tricking a user into executing a malicious desktop file used to be an actual attack vector, and still is in distros that use very old versions of nautilus that still allow executing desktop files.
When I’m developing and debugging, I’d like to run the desktop file without installing it. I understand the security implications and why someone might think it’s a bad idea. I do not want to have this wide open for every location or for every user.
So, regardless of whether anyone else thinks this is a good or bad idea, is it possible to amend the list of trusted desktop file locations?
There’s no such trusted list. Desktop files work like every file, it’s just that GNOME doesn’t ship with any app that is meant to run them.
So you can make your own “app” by creating a desktop file for a script that runs desktop files, and set it as the default app to open desktop files or manually choose it in the “Open with…” menu.