Ubuntu doesn't think that file is executable [closed]
I have an old C program (2003) of about 1600 SLOC written not by me. I compile it with gcc
without flags.
The problem is that the Files
program shows icon of a text file instead of an executable file and Ubuntu doesn't think that it's a executable at all. I've tried chmod +x
, chmod 777
and permissions tab of file's properties in Files
(which probably uses chmod anyway) but nothing changed.
When I double click the file I get the message "there is no application installed for "shared library" files".
I can run it from the console with ./
and it works correctly.
Also, actually I want not to run this program but give it to another application which would use this program. I can't do it because this application uses standard (as it seems) Ubuntu "Select file" window and file format is set to "Executable files" so I can't see my program in it.
I believe if I could see it both programs would run together correctly.
There has been a change of the way Nautilus handles executable files by default. Previously, it asked you what to do when you double-click one. Now, it tries to open the file using an application.
The get the dialog where you're given the option to execute the file, open Nautilus, go to Edit → Preferences → Behavior
and toggle Executable Text Files
to Ask each time
. This previously was the default. But now it's "View executable text files when they are opened" which means that Nautilus searches for an application to open the file with when you double-click it but can't find one for that file type.
I don't recommend toggling it to Run executable text files when they are opened
so you don't accidentally execute files.