LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Gnome at Fedora13: launch button for call of gnome-terminal to see script-output (http://www.linuxquestions.org/questions/linux-desktop-74/gnome-at-fedora13-launch-button-for-call-of-gnome-terminal-to-see-script-output-842758/)

A_Birkert 11-06-2010 02:04 PM

Gnome at Fedora13: launch button for call of gnome-terminal to see script-output
 
Hello!

just I found the solution for executing of this testscript:
Quote:

#!/bin/bash
echo "Testtext"
inside of a launched "gnome-terminal" by mapping this to a launch-button (german called: "Starter"). These are the entries of launch-properties-dialog:

Quote:

Type: application in terminal
Name: ***
command: gnome-terminal --working-directory=/home/andreas --command="sh -c '/home/andreas/bin/start_irda ; read'" --window
comment: ***
Important is:
Quote:

"read"
to get the terminal-window staying open to see the output of my testscript (here: "...start_irda" for my real goal to write a launch-button to start my IRDA-USB-stick, but this is not really important for first) and the command:
Quote:

"sh -c '...'"
to start the script with the "bash" here at "Fedora13".

Now my question:
Is this really the most easiest way? Or do anyone know a solution, which is more easy?

Kind regards
A_Birkert

impert 11-07-2010 06:40 PM

Hi,
It does sound a bit of a mouthful. I have a script called bu which runs with the command apps/bu. Since it uses a sudo command, the run command isn't necessary - the window stays open while sudo asks for the password. Selecting "run in terminal" and "use home folder" seems to make the other bits in your command redundant, unless your normal shell is not bash


All times are GMT -5. The time now is 12:06 PM.