Nautilus should allow execution of arbitrary files with execute bit set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nautilus |
New
|
Medium
|
|||
nautilus (Ubuntu) |
Triaged
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
Binary package hint: nautilus
Under linux any file may be executable using the binfmt-misc feature of the kernel. This should mean that when I double click on a file in nautilus that is executable, nautilus should allow me to execute it even if it doesn't fit into the normal definition of what an executable file is. That's why we have the execute bit. This is complicated by the matter that some file systems will show all files with an execute bit, so this must be customizable. I have a few suggestions for how this could work:
1) Actually check to see if the file is executable by the kernel
2) Allow users to select "execute if executable bit set" when setting up associations (this would be the easiest to do).
3) When in doubt ask the user (this would get annoying).
4) Try executing the file by default and if that fails do something else that is reasonable.
This really is a bug and not a feature request. On my system jar files are executable. Under nautilus jar files are opened by the archive program without any option to execute them even when the execute bit is set. If I can type in the name of a program on the command line and have it execute, I should be able to double click on it in Nautilus too.
There is a simple work around for .jar files since one can associate them with the java runtime based on extension, but many other formats supported by binfmt-misc don't have simple workarounds. The execute bit should mean the same thing in a GUI that it means on the command line.
kt@lovelace:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Changed in nautilus: | |
status: | New → Confirmed |
Changed in nautilus: | |
assignee: | nobody → desktop-bugs |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
Changed in nautilus: | |
status: | Unknown → New |
Changed in nautilus: | |
importance: | Unknown → Medium |
Another reason this is a bug is due to the way nautilus will handle files that are not executable but have the correct extension.
For example, on my system I've set up an association for jar files to be executed by the jvm. This is great if the jar file is intended to be executed. It works just like I requested above. Unfortunately it does the same thing for jar files that are not intended to be executed and don't have the execute bit set. What should happen in this case is that the file should be opened by the archive manager. Not all jar files are suitable for direct execution by the JVM. The way to differentiate them on systems with binfmt-misc installed is by looking at the execute bit.