PDA

View Full Version : How To Run FILE.SH From Mouse Clicks


chmod
01-28-2008, 08:58 PM
I'm a pentester and a programmer. New to Linux. I am hooked now. I love it. As stated.. I am new to Linux though, but catching on quickly.

My question is probably simple to most; I have a script.sh script file, and I want to be able to launch it by simple clicking on it. The only way I see to run this is by either pasting the path to a shell window or placing the file in the /bin directory and then typing the name in anywhere I am. How is the ladder possible?

MaXe Legend
01-28-2008, 09:18 PM
You can also put it in the /usr/bin or /usr/sbin directory and to add on that,
you can also do some shell command linking. On the netgh0st site i saw a
little tiny guide to do that.

But can't you just right click the shell file, then choose which program to use,
then choose /bin/sh as the program it should usually start? That's what i would
think of when we're talking about using your GUI to start shell files. :)

merlin051
01-28-2008, 09:21 PM
try right click > properties> make file executeable

then you can run them from clicking.

thats how i used my WPA_supp/dhcpcd ath0 script before i figured out how to make it autorun on startup:)

drpepperONE
01-28-2008, 10:01 PM
In Backtrack 3 beta.

On kde desktop right click ---->Create new --->Link Application


Set name of the link


In permission Tab set "is executable"

In "Application" tab browse command shell script to execute; for example

/root/test.sh


If you want see output go in right down option "Advanced option" and set the following:

"Run in terminal" and "Do not close when comand exits"


Bye.

harry
01-28-2008, 11:46 PM
chmod 755 <filename>

MaXe Legend
01-29-2008, 03:06 PM
or
chmod +x filename.sh
in this case we're talking :D

chmod
01-29-2008, 10:46 PM
or
chmod +x filename.sh
in this case we're talking :D

Tried that.. it doesn't run. Only runs if I open up a shell window and drag/drop paste path to it and launch it that way.

Is this an indication to possibly a bigger issue with my BT3 setup? Does everyone else have the capability of launching .sh files upon flagging them as executable?

In Backtrack 3 beta.

On kde desktop right click ---->Create new --->Link Application


Set name of the link


In permission Tab set "is executable"

In "Application" tab browse command shell script to execute; for example

/root/test.sh


If you want see output go in right down option "Advanced option" and set the following:

"Run in terminal" and "Do not close when comand exits"


Bye.

This method seems to perform what I need. Thanks for the tips and suggestions peps! Much appreciated! Thank you.