LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Launching a script from the desktop (https://www.linuxquestions.org/questions/linux-software-2/launching-a-script-from-the-desktop-496606/)

Ian D 10-29-2006 08:05 AM

Launching a script from the desktop
 
I am sure that this is a real newbie question.

I am running FC4. I have a script in my home directory which I can run by opening a terminal and then typing ./<nameOfScript>. The script needs to run in a Terminal window.

I would like to be able to start the script from an Icon on the desktop.

How would I create the Desktop Icon - and what would I put in there?

Ian

matthewg42 10-29-2006 08:31 AM

What desktop environment do you use? Gnome, KDE or another?

Ian D 10-29-2006 10:16 AM

I use the one that came by default with Fedora.

How do I determine which I am using?

Ian

reddazz 10-29-2006 10:27 AM

In KDE you can create a new application launcher and then using an advanced tab, choose to run it from a terminal. I am sure you can do something similar in GNOME.

Ian D 10-29-2006 10:54 AM

My desktop has the 'Taskbar' at the top - so based on reddazz's screenshot, it must be Gnome I am using.

teckk 10-29-2006 11:29 AM

One way to do it if you use eterm or xterm is to make an icon pointing to.
Code:

eterm -e nameofscript
Eterm will run the script and then terminate.
Or if you want the terminal window to be sticky then something like
Code:

xterm -hold -e nameofscript
You will have to kill the process when you are done though to get the terminal window to close.

Look at
man eterm
and
man xterm

The script will also have to be sitting somewhere in your path.


All times are GMT -5. The time now is 10:09 AM.