Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried right clicking on the file selecting properties and then the permissions tab and setting it to execute. However, when I double click the file it opens in gedit. What do I do?

share|improve this question
Duplicate How do I run executable scripts in Nautilus? – bain May 14 '14 at 0:52
Is this for sure about Nautilus? Could be XFCE / Thunar too. Or the file could be mounted with noexec? Or does Nautilus even respect noexec mounts? – Xen2050 May 14 '14 at 2:03
@bain I looked at that before I posted this question. I tried that solution before and it didn't work. – LarryK May 14 '14 at 2:34
up vote 12 down vote accepted

To run your script by double clicking on its icon, you will need to create a .desktop file for it:

[Desktop Entry]
Name=My script
Comment=Test hello world script

Save the above as a file on your Desktop with a .desktop extension. Change /home/user/ and /home/user/youricon.gif to the paths of your script and whichever icon you want it ot have respectively and then you'll be able to launch by double clicking it.

Specifically, for your situation, you need to do:

  1. Create a script that runs mono LOIC.exe. To do so, create a new text file with these contents:

    mono /home/logan/.loic/LOIC.exe

    Save this as /home/locan/ and then run this command to make it executable (or right click => properties and choose "Allow executing file as program"):

    chmod +x /home/logan/.loic/LOIC.exe
  2. Create a .desktop file that launches that script. Create a new text file on your Desktop called run_loic.desktop with these contents:

    [Desktop Entry]
    Name=Run LOIC
    Comment=Run LOIC
share|improve this answer

Your Answer


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.