I have a script that I want to run in a shell.
If I open RXVT and type the name of the script, the script runs.
I want this to happen when I click an icon.
When I click this icon, I want rxvt to open and my script to run.
Currently I have an executable text file sitting on my desktop.
The contents of this file are thus:
rxvt myscript
If I click on this icon, rxvt does not run, and my script does not run.
But my intention is that when I click on this icon rxvt should run, and my script should run.
Any suggestions ?
Thanks
penguinman007
How do I run a shell command when icon clicked? (Solved?)
I read that post:
#! /bin/sh
at the start of my script file does not pop up a shell.
I need a shell to pop up and display the output of the program I run within that shell.
This is the process I am trying to implement:
1. User clicks an icon.
2. Shell opens automatically and my script runs magically within this shell.
This is very basic.
I just don't know how to do it.
I can run XRVT with the following script:
XRVT
But I cant run XRVT and then run programs from within that XRVT shell because
XRVT
myscript
does not work
XRVT <myscript
also does not work
XRVT <<myscript
also does not work
myscript >XRVT
does not work
etc
thanks in advance for all the help.
Puppy is awesome
Penguinman007
#! /bin/sh
at the start of my script file does not pop up a shell.
I need a shell to pop up and display the output of the program I run within that shell.
This is the process I am trying to implement:
1. User clicks an icon.
2. Shell opens automatically and my script runs magically within this shell.
This is very basic.
I just don't know how to do it.
I can run XRVT with the following script:
XRVT
But I cant run XRVT and then run programs from within that XRVT shell because
XRVT
myscript
does not work
XRVT <myscript
also does not work
XRVT <<myscript
also does not work
myscript >XRVT
does not work
etc
thanks in advance for all the help.
Puppy is awesome
Penguinman007
See if this work:
#! /bin/sh
rxvt -e myscript
Copy the above to a text editor,
save it as /root/my-application/bin/myapp,
type "chmod 755 /root/my-application/bin/myapp" in rxvt to make it executable.
I tried this with "rxvt -e mp3blaster" and it works. However I don't how to add arguments to mp3blaster. E.g. "rxvt -e mp3blaster -a mylist.lst" (I want to tell mp3blaster to load my playlist and play automatically on startup) doesn't work. Any idea?
BTW, you can always type '--help' after a command to get more help, e.g.
rxvt--help
#! /bin/sh
rxvt -e myscript
Copy the above to a text editor,
save it as /root/my-application/bin/myapp,
type "chmod 755 /root/my-application/bin/myapp" in rxvt to make it executable.
I tried this with "rxvt -e mp3blaster" and it works. However I don't how to add arguments to mp3blaster. E.g. "rxvt -e mp3blaster -a mylist.lst" (I want to tell mp3blaster to load my playlist and play automatically on startup) doesn't work. Any idea?
BTW, you can always type '--help' after a command to get more help, e.g.
rxvt--help
Hey thanks for that ,
It works !
For your problem, you may want to put the application and the command line parameters into a seperate script eg:
Application -option -option
And then call this seperate script:
#! /bin/sh
rxvt -e your_script
P.S
I use ROX file manager to change scripts to executable using right_click->permissions.
It works !
For your problem, you may want to put the application and the command line parameters into a seperate script eg:
Application -option -option
And then call this seperate script:
#! /bin/sh
rxvt -e your_script
P.S
I use ROX file manager to change scripts to executable using right_click->permissions.