Ubuntu – How to execute sh script from a desktop shortcut


Im trying to make a shortcut to login my ssh server:

ssh x.x.x.x

I made the following file:


Made it executable:

sudo chmod +x ./ssh_home

Checked by right clicking properties to check if it was executable and it was..

But whatever I do, when double clicking it, it will launch gedit.
I tried "Open With" but no terminal app is shown there.
I searched the net but only found a way to link to the file while not integrating it in one "shortcut file"

Best Answer

I know this is a while ago but though if someone else asks I have this answer.

  1. Open nautilus
  2. Files menu -> behaviour tab
  3. Run executable text files when they are opened

In later versions this option is found at: Files menu -> Edit -> Preferences -> behaviour tab

In Ubuntu 14.10 move the mouse to the top of the screen and the File, Edit etc... Menu bar appears. Click EDIT -> Preferences -> Behaviour tab