Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Auto start an .sh Script

  1. #1
    Join Date
    Aug 2008
    Location
    Winnipeg, Canada
    Posts
    203

    Default Auto start an .sh Script

    I have a script file that needs to run on each boot with the following command

    Code:
    ctlscript.sh start
    I know how to add it into the kde as a start up application I just don't know how to add the start command and get iot to run properly

    Thank you for your help

    Cheers!
    etech97

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Auto start an .sh Script

    You could create a script called abcxyz.sh that contained the line "/path_to/ctlscript.sh start" and use that instead.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3
    Join Date
    Aug 2008
    Location
    Winnipeg, Canada
    Posts
    203

    Default Re: Auto start an .sh Script

    Quote Originally Posted by swerdna View Post
    You could create a script called abcxyz.sh that contained the line "/path_to/ctlscript.sh start" and use that instead.
    The new script file is opening with emacs

    Cheers!

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Auto start an .sh Script

    Quote Originally Posted by etech97 View Post
    The new script file is opening with emacs

    Cheers!
    Not enough information

    Do you mean that when you boot (and after the login to KDE), at the point when the script ctrlscript.sh should start, emacs opens instead?
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Aug 2008
    Location
    Winnipeg, Canada
    Posts
    203

    Default Re: Auto start an .sh Script

    Quote Originally Posted by swerdna View Post
    Not enough information

    Do you mean that when you boot (and after the login to KDE), at the point when the script ctrlscript.sh should start, emacs opens instead?

    Yes, that is correct!

    Cheers!

  6. #6

    Default Re: Auto start an .sh Script

    Quote Originally Posted by etech97 View Post
    Yes, that is correct!

    Cheers!
    Put your script in the directory ~/.kde4/env (create this directory if needed). And make the script executable:
    chmod 755 ~/.kde4/env/yourscript.sh

  7. #7

    Default Re: Auto start an .sh Script

    I assume the first line of your script looks like this:
    #!/bin/bash
    or like that:
    #!/bin/sh
    ?

  8. #8
    Join Date
    Aug 2008
    Location
    Winnipeg, Canada
    Posts
    203

    Default Re: Auto start an .sh Script

    Quote Originally Posted by please_try_again View Post
    I assume the first line of your script looks like this:
    #!/bin/bash
    or like that:
    #!/bin/sh
    ?
    yes!
    #!/bin/sh
    Cheers!

  9. #9
    Join Date
    Aug 2008
    Location
    Winnipeg, Canada
    Posts
    203

    Default Re: Auto start an .sh Script

    I just created a link in the desktop folder and it is working. That will do for now.....


    Thanks for your help

    Cheers!

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,853

    Default Re: Auto start an .sh Script

    Please note for next time that what youwanted (and succeeded to do after advice above) is NOT on boot, but on login. This makes the solution very different.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

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