Find the answer to your Linux question:
Results 1 to 4 of 4
I've created some shell scripts. I would like to turn them into double-click executables. At the moment, when I click on them, they open a text editor. Instead of doing ...
  1. #1
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261

    Turn shell script into double-click executable?

    I've created some shell scripts. I would like to turn them into double-click executables. At the moment, when I click on them, they open a text editor. Instead of doing that, I want them to load.

    At the moment, I have to open terminal, go into the directory that holds one of the scripts, and then I have to use "bash scriptname"

    I don't really like doing this over, and over, and over again, so I'm hoping someone knows the answer to this.

    For extra information, I'm using Ubuntu Feisty (7.04)

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    You have to make them executable, which is done with something like this:

    Code:
    chmod 755 scriptname
    or

    Code:
    chmod +x scriptname

  3. #3
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261
    Thank you.

    I didn't notice turning the script into an executable this way wouldn't open a terminal.

    I had been using some type of right-click and then clicking "run in terminal."
    However, I did not like this because it closed out the terminal window.

    I'm curious as to whether there is a way to make it double-clickable but yet show what is happening in terminal, while not having the terminal close when the script is done installing. I want this, because I want to know what installed correctly and what did not.

    Is there a way?

    Anyway, isn't there some kind of command to create a log? Could I do that instead?

  4. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    You could run a read command that had a forever timeout, that waited for you to hit some key to quit, or you could redirect STDERR or OUT to a logfile.

Posting Permissions

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