How to make a desktop icon run a bash script? (Solved)
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?
how can I generate an icon that launches the console with my bash script?
Hello, wawl.
Welcome to the kennels!
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
Welcome to the kennels!
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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
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
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.
Read here for some ideas.
What is in the script? Getting things to work out of the Startup folder can be a bit tricky.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.)
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.
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.
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 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!
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: Select all
exec rxvt-e sh / ... / Script.txt
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!
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
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.
Yes, but outside from this PATH is it possible with ./example.shtallboy 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.
My problem was to start a script AND the console with one click - and we have the solution now.
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
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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)