Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to get an executable to execute by default?

What I mean is this. I have an .sh file, which if I click on twice, it will show me this:

enter image description here

If I then click Execute, it does the right thing. Is it possible to get it to Execute without being shown the Execute File dialog box? So simply by double clicking the .sh file, it should do its thing without showing me the Execute File dialog box.

I am using Lubuntu/PCManFM if that info is needed.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You have to create a "Desktop Entry" like this (no tested):

#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Type=Application
X-Created-By= name
Icon= icon
Exec="path_of_file" %u
Name=name of program
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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