Executable script in Cinnamon 19

Discussion in 'all things UNIX' started by Brian K, Jul 19, 2018.

  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,150
    Location:
    NSW, Australia
    I can't get it to work. I'm trying to boot from Cinnamon to IFL using TeraByte's bootnowu.

    If I paste this into a Terminal...

    echo "mypassword" | sudo -S bjk/bn/bootnowu ifl
    reboot

    ...Mint reboots into IFL.

    But this script (ifl.sh) doesn't work

    #! /bin/sh
    echo "mypassword" | sudo -S bjk/bn/bootnowu ifl
    reboot

    "Failed to execute child process "home/bjk/bn/ifl.sh (No such file or directory)"

    Both bootnowu and ifl.sh are executable.
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,221
    Because when you run a script, it starts its own shell. You should run the parent script with sudo.
    Also, use full paths for script commands, because you don't know what environment the script runs under.

    What permissions do you have on the script, and how do you run it btw?

    Mrk
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,150
    Location:
    NSW, Australia
    Mrk,

    My aim is to run the script from a double click. No typing. I could do this in Mint 18.

    Permissions...
    Owner Access Read and Write
    Group (brian) Access Read and Write
    Access Read-0nly
    Execute tick present
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.