shell scripting

stevovo

Expert Member
Joined
Apr 24, 2008
Messages
1,496
Reaction score
2
Location
Pretoria
Ok, this must be a very noob question but I just cant seem to find the right wording to google my problem.

I want to execute a shell script from a shortcut on the desktop, it works fine on normal scripts that dont have user input but the script I want to run requires user input but no terminal window pops up to ask for the input?

What am I doing wrong?

EDIT: the script works 100% if I execute it from the terminal itself.
 
In KDE there is an option you should enable, must be the same in Gnome:

Right click desktop-> create link to application-> Fill in name-> Click tab "Application"

Set command (link this to the shell script you want to run) and next click advanced.
Tick Run from Terminal and also keep open once script ends.

Gnome must have something similar.
 
AFAIK, you need to set a property on the shortcut so that it launches in a terminal window. if the option is not available, create a shortcut to gnome-terminal and pass the command line argument to the script you would like to execute:
/usr/bin/gnome-terminal --command /usr/local/sbin/yourscript.sh
 
AFAIK, you need to set a property on the shortcut so that it launches in a terminal window. if the option is not available, create a shortcut to gnome-terminal and pass the command line argument to the script you would like to execute:
/usr/bin/gnome-terminal --command /usr/local/sbin/yourscript.sh

Any idea how to accomplish that in xrvt?

I'm trying out puppy linux and I dont think that above command works in it but I see where your going...
 
I tried running "rxvt -e myscript" and it opens in another windows but it just shows blank :confused:

EDIT: I think rxvt is the same as xterm?
 
Last edited:
Nevermind, it looks like I came right. I ended up making another script with the following line: xterm -e /actual/script

and it now opens in a proper window and accepts input :D
 
Top
Sign up to the MyBroadband newsletter
X