Files execution

Hi buddy, Is there a way to remember the execution choice of a file?
For example, by default every time I click on something like File Manager or Chromium or anything else it asks me what I want to do with it.
Is it possible to just Execute it every time?

Connie R. Lawson

add as sudo or root

chmod +x

to the file and it will make it executable

I guess the requester is running a desktop environment. And as soon as he is clicking on a desktop icon, he gets the question what to do :wink:

ok I found where the issue is. Basically all items on Desktop are sym links to the original file and this is causing the question what to do with it every time you double click on.

root@DietPi3:~# ls -la /root/Desktop/
total 12
drwxr-xr-x  2 root root 4096 Oct 16 12:21 .
drwx------ 13 root root 4096 Oct 16 13:17 ..
lrwxrwxrwx  1 root root   45 Oct 16 12:17 dietpi-config.desktop -> /usr/share/applications/dietpi-config.desktop
lrwxrwxrwx  1 root root   47 Oct 16 12:17 dietpi-launcher.desktop -> /usr/share/applications/dietpi-launcher.desktop
lrwxrwxrwx  1 root root   47 Oct 16 12:17 dietpi-software.desktop -> /usr/share/applications/dietpi-software.desktop
lrwxrwxrwx  1 root root   36 Oct 16 12:17 htop.desktop -> /usr/share/applications/htop.desktop
lrwxrwxrwx  1 root root   39 Oct 16 12:17 pcmanfm.desktop -> /usr/share/applications/pcmanfm.desktop

But I found a workaround to avoid this question and to open the application strait without asking. You would need to replace the sym link with a file. This file need to contain the information about the app and where to find it. For testing, I created a 2nd dietpi-software shortcut

nano /root/Desktop/dietpi-software.desktop2

Add following

[Desktop Entry]

Save and exit the file. You now have the 2nd dietpi-software shortcut, that can be used with being ask anything :slight_smile:

Some Github discussion:

EDIT: In meantime we found other solutions as well. So good chance to have an offical fix soon.

final solution available with DietPi v6.33.3