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 Tue 29 Jul 2014, 23:11
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 [10 Posts]  
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: 4229
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 poster's 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: 8924
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: 10943
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: 3357
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: 440
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: 4229
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 poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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