how to skip "execute file" dialog in lubuntu (PCManFM)

When I click on an executable file in PCManFM (default file manager in Lubuntu), I get an “Execute File” dialog with three options (Execute, Execute in terminal, Cancel). Is there a way to set default action (e.g. Execute) in order to skip annoying “Execute File” dialog?


Solution 1:

Open PCManFM, Go to Edit/Preferences/General, Check box for "Don't ask options on launch executable file"

Solution 2:

I know this may be old but it might help someone.

Simply create a .desktop file with the following content

[Desktop Entry]
Type=Application
Icon=path/icon.png
Name=Name
Comment=Description       
Categories=Applications
Exec=/path/to/yout/exec
StartupNotify=true
Terminal=false

Save it like myexec.desktop And you are good to go.

It worked for me and i found that is a better way that changing the default behavior of the file manager (plus i never found the way everywhere i read was only about nautilus).

Solution 3:

As a workaround, if you have the interesting file selected, pressing twice Space or Enter key will run it as you wish, as Execute is the default button, for the default action.

It is may be not a good idea to set Execute as default (by default :) as sometimes you may want to 'Execute in terminal', or simply 'Cancel' if you clicked an executable you just unzipped from the Internet by mistake.

Solution 4:

To disable this annoying dialog from command line:

set quick_exec=1 in ~/.config/libfm/libfm.conf

This is equivalent to james' answer. I'm doing this for my VNC docker image.