KDE and the executable bit
David Faure
faure at kde.org
Mon Jan 28 11:30:57 GMT 2008
On Saturday 26 January 2008, Andras Mantia wrote:
> The above test.txt
> is no different from the same file called test.sh.
It is. By naming it .txt you are asking for the file to be considered as text/plain.
I don't think it would be a good idea to treat any +x file as a shellscript. Especially
with some filesystems (like FAT) making everything +x....
-rwxrwx--- 1 root plugdev 169 2003-09-17 02:19 boot.ini
GUI applications are not like a shell. In a shell you choose between ./boot.ini (if you really
wanted to execute it) and "cat boot.ini".
However in a GUI you just click on it, and KDE has to "do the right thing".
I don't think that considering every file with +x as a script is "doing the right thing",
it would just lead to too many problems (false positives).
What should happen if you give +x to a JPG file for instance?
So, honouring the extension is the least we can do to find a better mimetype than
"this has +x so surely it must be something that can be executed" - far from true in many cases.
"*.sh" is a much better and precise information.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list