Running programs from Rox

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Running programs from Rox

#1 Post by Lobster »

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? 8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#2 Post by Bancobusto »

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: Select all

#!/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 :oops:

doopdoop
Posts: 48
Joined: Thu 28 Jul 2005, 08:38
Location: Magdeburg, Germany

#3 Post by doopdoop »

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:

Code: Select all

 xterm -e "$1"

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#4 Post by Bancobusto »

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!

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#5 Post by Lobster »

doopdoop wrote:What does your script do ?
[/code]
It calls and displays text using gxmessage (a new dotpup)

Code: Select all

#!/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 & 
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post by GuestToo »

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)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#7 Post by Lobster »

GuestToo wrote: if you rename your file lobster instead of lobster.sh, it might work
(or xmessage)
:lol: Changing it turned it into a cog - runnable prog. It works!

thanks everyone
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Post Reply