Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Sun 31 Jul 2005, 22:08 Post subject:
Running programs from Rox |
|
This always confuses me (not difficult)
I have a shell script that can be called from the command line with
./lobster.sh
but does not run when clicked on from rox
I have set the permissions and the run features (with Rox) but maybe I should use the command line?
What would I type in or do?
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
Bancobusto

Joined: 13 Jun 2005 Posts: 168 Location: Vancouver Island
|
Posted: Sun 31 Jul 2005, 22:17 Post subject:
|
|
Lobster, that's strange.
I created a script called midnight-commander.
I can click on it inside ROX and it does what I want it to.
Code: | #!/bin/sh
aterm -tr -trsb -sh 50 -fg white -e mc |
What is your script? Maybe I don't understand...
Ah, I don't. A shell command. I guess I'm not being very helpfull
|
Back to top
|
|
 |
doopdoop
Joined: 28 Jul 2005 Posts: 48 Location: Magdeburg, Germany
|
Posted: Sun 31 Jul 2005, 22:30 Post subject:
|
|
What does your script do ?
If it is supposed to generate some output to the console, which you want to see, you have to make sure it is run in an rxvt or another xterm. Otherwise the script does not where to put it's output and runs quietly.
My workaround in ROX is to name each script, which I want to run in an xterm, with an .sh and associate the following run action with the type x-sh:
|
Back to top
|
|
 |
Bancobusto

Joined: 13 Jun 2005 Posts: 168 Location: Vancouver Island
|
Posted: Sun 31 Jul 2005, 22:36 Post subject:
|
|
That's very well put. I think that that was what I was going to try and say next.
doopdoop, thanks again for all your help!
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Sun 31 Jul 2005, 23:03 Post subject:
|
|
doopdoop wrote: | What does your script do ?
[/code] |
It calls and displays text using gxmessage (a new dotpup)
Code: | #!/bin/sh
gxmessage -file communication.txt -buttons Next -bg yellow -name IRC_from_Anywhere -nearmouse &
gxmessage -file info.txt -buttons Next -bg green -name Info -nearmouse &
gxmessage -file imagewiki.txt -buttons Next -bg pink -name Image -nearmouse & |
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Mon 01 Aug 2005, 00:04 Post subject:
|
|
a file with a filename extension .sh will execute the rox run-action that was setup for it
like an .mp3 file can be setup to run xmms if it's clicked
an ordinary executable file is not using rox's run-action system
so an executable file named click-me may behave differently from a file name click-me.sh
the difference is that a .sh file's working directory will be $HOME ... an ordinary executable file's working directory will be the dir the executable is in
if you rename your file lobster instead of lobster.sh, it might work
you can see what working dir the executable is using by putting this line in the file:
gxmessage "`pwd`"
(or xmessage)
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Mon 01 Aug 2005, 02:38 Post subject:
|
|
GuestToo wrote: |
if you rename your file lobster instead of lobster.sh, it might work
(or xmessage) |
Changing it turned it into a cog - runnable prog. It works!
thanks everyone
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
|