Page 1 of 1
Running a script via a desktop icon?
Posted: Fri Oct 14, 2022 8:02 am
by Jasper
Hi there
I want to be able to place a script on my desktop and assign it an icon.
I am unsure as how I can make it executable as I need to get terminal to open and then run the script.
Can someone advise me how I can do this please?
Re: Running a script via a desktop icon?
Posted: Fri Oct 14, 2022 8:28 am
by williwaw
your script should run the command something like
xterm -hold -e /root/Downloads/clearRAM.sh
the hold option keeps the terminal window open until you close it, useful if there is a error reported
Re: Running a script via a desktop icon?
Posted: Fri Oct 14, 2022 8:50 am
by Jasper
Hi williwaw
Thanks for sharing the tip
Unfortunately, it doesn't appear to run. After adding your line, I am clicking on the "OK" button to set it.
Sorry for being a pain
This is what I see when I run the script in terminal manually.
Re: Running a script via a desktop icon?
Posted: Fri Oct 14, 2022 9:32 am
by williwaw
sorry, its late here.
your script command should run the command script something like
xterm -hold -e /root/Downloads/clearRAM.sh
where xterm is on the first line
and the argument -hold -e /root/Downloads/clearRAM.sh is on the second.
this presumes clearRAM.sh is executable, should you actually want it to run from your downloads folder.
I would be more inclined to have the xterm -hold -e inside the clearRAM script, and locate clearRAM.sh someplace rather than your downloads folder, perhaps someplace dedicated to your scripts?
just drag a relative link from clearRAM.sh to your desktop and just click on it when you want it to run it
Re: Running a script via a desktop icon?
Posted: Fri Oct 14, 2022 10:08 am
by mikewalsh
@Jasper :-
/root/my-applications/bin is a good place to put personal scripts, etc. It's a non-standard location for any other Linux distro, but for Puppy it is actually in the $PATH.
Place your script there. Having done this, then drag'n'drop the script to the desktop. I'm busy ATM, but can advise about icons later on, if necessary.
Mike.
Re: Running a script via a desktop icon?
Posted: Sat Oct 15, 2022 10:58 am
by Jasper
Thank you both for you suggestions.
I still could not get it to work. It's no big deal just a few extra clicks to action.