I can execute the file via terminal. But how can I tell Nautilus to do the same on double click?
You can add mime type associations in
$/.local/share/application/mimeapps.list for current user. Sample snippet is here,
[Added Associations] application/excel=planmaker-free18.desktop; application/mspowerpoint=presentations-free18.desktop; application/msword=textmaker-free18.desktop; application/ppt=presentations-free18.desktop; [Default Applications] text/html=google-chrome.desktop text/x-arduino=arduino-arduinoide.desktop
You have to first add new association it to
[Added Associations] section and then add to
[Default Applications] section to make default. For your type in question add
application/x-sharedlib=some-application.desktop in both sections. Then save the file and try to open. May be you want to restart the nautilus.
If you want to make edits globally edit file in