run executable files via konqueror

Michael S. Mikowski mike.mikowski at mindsharemanagement.com
Fri Mar 18 23:40:37 GMT 2005


On Friday 18 March 2005 13:16, Thomas Ludwiczak wrote:
> To whom it may concern,
>
> I am developing Fortran 90 programs in Linux and after creating a *.exe
> file I am just able to run the program in a shell. (always typing ..
> *.exe in the command line)
> I would like to run the program (*.exe) by double clicking this file in
> Konqueror. So in few words:
> Konqueror should open a bash shell to run the *.exe file by itself.
> How can I manage this?

Thomas, you should be able to map a mime-type to an executable in konqueror.  
The tricky part might be getting konqueror to recognize your files as Fortran 
executables.  Traditionally, mime-types are not determined by the file 
extension, but by the first few lines of the file.  For example, create a 
file called "test" in your home directory, and then place the following text 
in it:
=============
#!/bin/bash

echo "hello world"

exit 0
=============

Make sure the "#!/bin/bash" line is the very first one.  If you then view it 
with konqueror (right click over it and check its properties) it should 
correctly identify it as a shell script.

However, if you move the file to "test.txt" it will now assume it's a plain 
text document.  It appears konq first honors extensions, and then uses file 
content pattern matching (e.g. mime magic, IIRC) to identify a file type.

If the only have fortran executables with the .exe extension, you should be 
able to map these in konq:

See Settings -> Configure Konqueror -> File Associations

It should be pretty straight forward from there...

-- Mike




More information about the kfm-devel mailing list