Results 1 to 7 of 7

Thread: How To Run FILE.SH From Mouse Clicks

  1. #1
    Member
    Join Date
    Jan 2010
    Posts
    83

    Default How To Run FILE.SH From Mouse Clicks

    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?

  2. #2
    Member
    Join Date
    Dec 2007
    Location
    @InterN0T
    Posts
    315

    Default

    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.
    [quote][I]I realized, that I had fallen down from the top of the mountain into a deep, terrifying and dark hole, just to find out that another mountain in front of me, much greater than the previous, was the next step in life. I began to wander uphill on the next mountain of life while I knew it would be much harder than the previous mountain. [/I]- MaXe[/quote]

  3. #3
    Member
    Join Date
    Mar 2007
    Posts
    204

    Default

    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

  4. #4
    Junior Member drpepperONE's Avatar
    Join Date
    Nov 2007
    Posts
    51

    Default

    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.
    Use your Brain, don't be slave!!!!

  5. #5
    Junior Member
    Join Date
    Jul 2007
    Posts
    47

    Default

    chmod 755 <filename>
    Removed by -=Xploitz=-
    We do NOT allow external links. We only allow "internal" links to our forums. See PM's.

  6. #6
    Member
    Join Date
    Dec 2007
    Location
    @InterN0T
    Posts
    315

    Default

    or
    chmod +x filename.sh
    in this case we're talking
    [quote][I]I realized, that I had fallen down from the top of the mountain into a deep, terrifying and dark hole, just to find out that another mountain in front of me, much greater than the previous, was the next step in life. I began to wander uphill on the next mountain of life while I knew it would be much harder than the previous mountain. [/I]- MaXe[/quote]

  7. #7
    Member
    Join Date
    Jan 2010
    Posts
    83

    Default

    Quote Originally Posted by MaXe Legend View Post
    or
    chmod +x filename.sh
    in this case we're talking
    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?

    Quote Originally Posted by drpepperONE View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •