I need a "launch" icon


 
Thread Tools Search this Thread
Operating Systems Linux I need a "launch" icon
# 1  
Old 06-04-2015
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.

Moderator's Comments:
Mod Comment Not about scripting, thread moved to Linux forum


---------- 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.

Last edited by Scrutinizer; 06-04-2015 at 07:43 PM..
# 2  
Old 06-04-2015
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:
Code:
$ grep -ve Comm -ve "\[" $(locate firefox.desktop)

Code:
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
Code:
[Desktop Entry]
Name=Script
GenericName=My Script
Exec=script.sh
Terminal=true
Type=Application

hth
# 3  
Old 06-05-2015
Quote:
Originally Posted by Tovian
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.

Moderator's Comments:
Mod Comment Not about scripting, thread moved to Linux forum


---------- 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.
Moderator's Comments:
Mod Comment The moderators on the UNIX & Linux Forums are all just volunteers; not paid staff. We don't have an office at the UNIX & Linux Forums and do not hold meetings to decide how each of the dozens to thousands of posts that are submitted each day should be handled. But, that doesn't mean that we don't try to work together to make this forum a valuable resource for users trying to learn how to effectively use the tools provided by UNIX systems, Linux systems, and other similar systems.

And, there was just one moderator (Scrutinizer) who moved both of your threads.

Your first question was posted in a technical forum intended to handle questions about writing shell scripts, but asking where to post questions about writing bash shell scripts is not a question about writing bash shell scripts (so it was moved to the What is on Your Mind? forum which is one of the forums reserved for non-technical questions).

The question in this thread is a technical question, but it is not about writing a shell script either; it is about how to associate an icon with an executable file (shell script, perl script, compiled C program, etc.) and how to run that executable by "clicking" or "double-clicking" on that icon. That might be a question about a feature of your operating system (which is what Scrutinizer guessed when he moved it to the Linux sub-forum of the Operating Systems forum) or it might be a question about the windowing system you're using with PCLinuxOS (in which case it might have been more appropriately posted in the UNIX Desktop for Dummies Questions & Answers forum). With what you have said so far, only you can determine which forum should have been used.

When you go to the home page for the UNIX & Linux Forum, the bottom part of that page lists the forums and sub-forums and provides a brief description of the topics that are discussed in each one. If you use those descriptions as a guide to the forum you choose when you post a question, the moderators and administrators won't move your threads. If you do that, and follow the other rules you agreed to when you joined this forum, you might not ever hear anything from an administrator or moderator again.
These 2 Users Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question