I recently re-installed Ubuntu in 64 bit, (before I had it in 32 bit). I had the home folder on a partition and the system on another. So when I re-installed I kept my old home folder.

My problem is that now, my c++ executables that use the SDL are recognize as "shared library", and so I can't directly run them from nautilus. I searched for a solution, and found that it was caused by a bug of mime-type (see https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1639531), which consider each file marked as "position independent executable" (by gcc) as a "shared library".

As It seems that there's no way to make mime-type recognize it normally, I would like to be able to launch "shared libraries" files in nautilus (as they are runnable from a terminal). I tried to set the default program for this kind of file to an application called "Run Software" but when I try to launch it, nothing happens.

What is the right way to make nautilus to run a certain type of file and not to associate it with an application ?

  • for nautilus run the executable thru a .desktop file you create per executable & place the .desktop in an applications folder like /usr/share/applications or ~/.local/share/applications or /usr/local/share/applications – doug Jan 16 '17 at 21:24
  • The fact is that I got a lot of files and it would be really boring to create a .desktop file for each – dido22 Jan 16 '17 at 21:28
  • You said you "found that it was caused by a bug of mime-type..." Please edit your question to add a link to the bug report or other page you found where that is discussed. Also, you mentioned that writing .desktop files (as @doug suggested) would be too laborious to use as a workaround, if done manually. How about writing a script to generate them all? If that might be an acceptable solution, then I suggest editing your question to mention that and also include an example of a .desktop file for one of these programs that does work (or, if you cannot make one, describe the problem). – Eliah Kagan Jan 16 '17 at 21:52
  • I tried to create a .desktop file, but it didn't worked : [Desktop Entry] Type=Application Name=Program Exec=/path/program (the return characters are missing) The thing is that my program uses images and .ttf files that are in his directory and so it don't work (I also tried Exec=./program but in this case it doesn't find the program ! ) – dido22 Jan 17 '17 at 16:13

I have the same problem. When I click on compiled executable in Nautilus (Files 3.20.4), I got the message:

there is no application installed for "shared libraries" files"

There are two workarounds.

  1. Just create a one line script in the same directory:


    and set Allow executing file as program in Nautilus. (Or add +x via chmod.)

  2. Open this directory in Terminal and run there. (or drag and drop the file from Nautilus to Terminal)

A better solution is to create a Desktop launcher, passing the full file name to the shell, like the below example.

[Desktop Entry]
Name=Run Executable
Comment=Run Executable
Exec="/bin/sh" -c %f

Save it under any name in ~/.local/share/applications
After this, open Nautilus, select the executable file, open the content menu by right-clicking and select the new launcher in "Open With Other Application' dialogue.
Thus, you can launch quickly any executable file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.