Results 1 to 4 of 4

Thread: .sh running on terminal automatically closes

  1. #1
    Join Date
    Jan 2011
    Location
    Poor Country
    Beans
    22
    Distro
    Ubuntu 10.10 Maverick Meerkat

    .sh running on terminal automatically closes

    I've encountered this problem before, but I forgot how I have fixed it exactly. I think I changed the perms but I don't remember the specifics.

    I have changed the perms for the folder and the files inside:



    But it still automatically closes. I tried going to the file directory on the terminal, and then I do this:

    kirsten@StinkyDudels-eM350:~/Apps/Digital-linux-x86$ bash Digital.shDigital.sh: line 20: /home/kirsten/Apps/Digital-linux-x86/lib/python: Permission denied
    Digital.sh: line 20: exec: /home/kirsten/Apps/Digital-linux-x86/lib/python: cannot execute: Permission denied
    I'm not sure what's the matter now. Here's the contents of Digital.sh, if it helps:

    #!/bin/sh

    # We assume Darwin means Mac OS X. Sorry, Darwin guys.
    if [ "x`uname -s`" = "xDarwin" ]; then
    dir=`dirname "$0"`
    dir=`cd "$dir"; pwd`
    base=`basename "$0"`


    export RENPY_LAUNCHER_DIR="$dir"


    if [ -e "$dir/${base%.sh}.app/Contents/MacOS/${base%.sh}" ] ; then
    launcher="$dir/${base%.sh}.app/Contents/MacOS/${base%.sh}"
    else
    launcher="$dir/${base%.sh}.app/Contents/MacOS/Ren'Py Launcher"
    fi


    exec "$launcher" "${0%.sh}.py" "$@"
    fi


    exec "`dirname \"$0\"`/lib/python" "-OO" "${0%.sh}.py" "$@"
    Any help would be appreciated!

    SOLVED: Had to set the python file to allow executable file to be run. >.>
    Last edited by tastefuldeath; January 15th, 2014 at 04:08 AM.

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,544
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: .sh running on terminal automatically closes

    It closes because the script crashes. It crashes because the user doesn't have permission to execute the file /home/kirsten/Apps/Digital-linux-x86/lib/python. I've got no idea why this package wants it's own version of the python interpreter (because that's what it looks like), but to make this run you have to add execute permission (for yourself at least) to the aforementioned file.

  3. #3
    Join Date
    Jan 2011
    Location
    Poor Country
    Beans
    22
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: .sh running on terminal automatically closes

    :S fixed. Why does it have to be that way? I had to manually change to set it to execute for all those? D: FYI, this file is uhm xD a visual novel game. Is there an easier way to get all those in a folder to be executed?
    Last edited by tastefuldeath; January 15th, 2014 at 04:07 AM.

  4. #4
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,544
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: .sh running on terminal automatically closes

    Using wildcards or recursively adding permissions (via the terminal, by clicking "Change permissions for enclosed files", selecting multiple files maybe) may be slightly faster. It is possible to store permissions with the files in an archive, but it looks like it wasn't done here.

    You may mark this thread as solved. Click "Thread tools" at the top of the page.

Tags for this Thread

Bookmarks

Posting Permissions

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