I need a "launch" icon

I am having an issue with my Bash scripts running on PCLinuxOS. I modify them in my ~/Documents folder - then I move them to /usr/local/bin. I also mark them executable. When I run them in a console they run perfectly. If I set up a simple link to them (on my desktop) and double-click it nothing happens. I just want an icon on my desktop that will launch my scripts correctly.

(I have already modified the permissions on the folder so that I can execute from it).

Thank you in advance.

---------- Post updated at 07:14 PM ---------- Previous update was at 06:34 PM ----------

Please, please, please stop moving my posts/threads !!

I originally opened a thread asking where to ask my question. A moderator moved that thread and replied that I should post my question in the shell scripting forum. So, that's where I posted. Now, a different mod has moved my question to the forum I originally asked about. I would truly appreciate if THE SUPREME MODERATOR will please tell me whether to post my scripting questions in the Shell scripting forum or the Linux forum. And, as I stated in my original question... there is neither a PCLinuxOS sub-forum nor a "other" sub-forum. So, if I'm supposed to ask Linux questions in the Linux forum please counsel me as to which distro sub-forum I should use given that there is not one for my distro.

My apologies, but this is my first experience with a forum where the mods don't work together. I'm baffled as to how to respond.

Hi Tovian

I'm not a mod, but as far i understand your posts, consider:
Your post

  1. isnt about a scripting (code)
  2. is about how to create a desktoplink

One have to differ between a file-link or desktop-link.
What i'm talking about is something like this:

$ grep -ve Comm -ve "\[" $(locate firefox.desktop)
Version=1.0
Name=Firefox
GenericName=Web Browser
Exec=firefox %u
Icon=firefox
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
X-Desktop-File-Install-Version=0.22

Of which you need to copy-paste (modify where required) the bold lines to a new file which you name like: myscript.desktop .
Then place that file on your desktop and double click it.

As you placed your script in a default directory, it is available to the $PATH, thus you dont have to pass the path to it.
myscript.desktop

[Desktop Entry]
Name=Script
GenericName=My Script
Exec=script.sh
Terminal=true
Type=Application

hth

2 Likes