Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 22:25
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to make a desktop icon run a bash script? (Solved)
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
wawi

Joined: 02 Feb 2013
Posts: 6
Location: Germany

PostPosted: Sat 02 Feb 2013, 01:12    Post_subject:  How to make a desktop icon run a bash script? (Solved)  

Hi,

how can I generate an icon that launches the console with my bash script?
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Sat 02 Feb 2013, 03:09    Post_subject:  

Hello, wawl.

Welcome to the kennels! Smile

There already are two console icons in /usr/local/lib/X11/pixmaps, console48.png and console24.png. Perhaps more in /usr/share/pixmaps and /usrshare/icons. Certanly small ones in /usr/local/lib/X11/mini-icons.

Return to your console script. Right click on it. 12th entry in the submenu says "Define icon". Click on that. A rectangle opens. Drag one of the icons above in the open rectangle. The rectangle closes automatically. Now, if you bring your script on your desktop, it will carry the chosen illustration.

Best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
wawi

Joined: 02 Feb 2013
Posts: 6
Location: Germany

PostPosted: Sat 02 Feb 2013, 10:19    Post_subject:  

Thanks for the welcome.

It was a misunderstanding. I do not want a beautiful icon, but a icon of the desired functionality: Clicking on it should
    start the console
    start my script in the console.

I am also interested on the way to my script in a console to start immediately after boot. (Place the script in the Startup folder did not work.)
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9159
Location: Stratford, Ontario

PostPosted: Sat 02 Feb 2013, 10:51    Post_subject:  

Read here for some ideas.

Quote:
I am also interested on the way to my script in a console to start immediately after boot. (Place the script in the Startup folder did not work.)

What is in the script? Getting things to work out of the Startup folder can be a bit tricky.
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11082
Location: Arizona USA

PostPosted: Sat 02 Feb 2013, 11:59    Post_subject:  

Wawi, I haven't tried it, but it looks to me like if you follow musher's instructions the result will be an icon on your desktop that will do exactly what you said you want. You can even draw a custom icon if you want. Either way, when you click on it, it will run your script.
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 02 Feb 2013, 18:07    Post_subject:  

After you created the script, and saved it, did you go back and set the script to be executable?
I have forgotten to do that at times myself!
I have not figured out if the script needs to be put in an executables directory such as usr/bin or root/my-applications/bin for it to be found.
Otherwise, one gets feedback of the file or directory not being found or that it is not recognized as a command.
Back to top
View user's profile Send_private_message 
wawi

Joined: 02 Feb 2013
Posts: 6
Location: Germany

PostPosted: Sat 02 Feb 2013, 18:29    Post_subject:    

Hello Flash,

I tested both:

musher's result is only another icon, but rcrsn51 has the perfect solution.

It works also, the script in the Startup folder to run automatically.

And, of course, it is possible, to split the script in two parts with
Code:
exec rxvt-e sh / ... / Script.txt
in the first.

I thought, click start of script icons works out of the box in other distributions, but I was wrong. Ubuntu Unity has the same problem.

Thanks at all!
Back to top
View user's profile Send_private_message 
tallboy


Joined: 21 Sep 2010
Posts: 444
Location: Oslo, Norway

PostPosted: Sat 02 Feb 2013, 19:41    Post_subject:  

Hi wawi.
The script to be executed, must be in the executable path, if you place the script - or a link to it - in ~/my-applications/bin/, it should run.

See this thread from earlier this week: Putting icons on desktop.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send_private_message 
wawi

Joined: 02 Feb 2013
Posts: 6
Location: Germany

PostPosted: Sat 02 Feb 2013, 19:56    Post_subject:  

tallboy wrote:
Hi wawi.
The script to be executed, must be in the executable path, if you place the script - or a link to it - in ~/my-applications/bin/, it should run.


Yes, but outside from this PATH is it possible with ./example.sh

My problem was to start a script AND the console with one click - and we have the solution now.
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4245
Location: Gatineau (Qc), Canada

PostPosted: Wed 06 Feb 2013, 23:00    Post_subject:  

Hi, wawi.

You wrote:
< musher's result is only another icon,

Just a note to tell you that I have lots of "another icons" on my desktop or in a ROX panel that have been launching lots of bash scripts in Puppy successfully for years.

It's not the icon that launches the script, it's the script dressed up with an icon. You can have any script on your desktop with just the ugly default icon, and it will do its job, dressed up with a lovely icon or not.

I'm sure rcrsn51's works fine, and I won't bring up the matter again, but you know very well deep down what this "another icon" is telling you: "Do a thorough check next time before affirming that something does not work."

Respectfully,

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0660s ][ Queries: 12 (0.0070s) ][ GZIP on ]