Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: autorun a shell at/before startup?

  1. #11
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: autorun a shell at/before startup?

    Quote Originally Posted by WilsonMESS View Post
    Yes it prompts me to choose whether to open the file or to execute it.
    Actually I didn't write the shell, I found this when I was troubleshooting the touchpad (which can be found here: http://apt-blog.net/configuring_lapt...chpad_in_linux , in Chinese). The stuff actually worked automatically for a while, so I don't think it's about the slash. But yesterday, I didn't know how, it just can't work properly, and when I open the file, it didn't prompt me what to do. The gedit simply pop out and I thought it might be solved by using the chmod +x command. Though now it can work manually, I'm still trying to figure out how to make it automatially...
    That's because it's set as executable.

    You'd have to run it in a Terminal.

    @matt_symes: That might work.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  2. #12
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: autorun a shell at/before startup?

    Quote Originally Posted by matt_symes View Post
    Hi

    What about running the script using update-rc.d with a run level

    http://embraceubuntu.com/2005/09/07/...run-at-bootup/

    Kind regards
    Better yet, just run it via /etc/rc.local (chmod +x afterward!). I'm sure either will work just as well though, so it's up to the OP which one to do.

  3. #13
    Join Date
    Nov 2010
    Location
    Shanghai, China
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: autorun a shell at/before startup?

    Quote Originally Posted by CharlesA View Post
    That's because it's set as executable.

    You'd have to run it in a Terminal.

    @matt_symes: That might work.
    Quote Originally Posted by James78 View Post
    Better yet, just run it via /etc/rc.local (chmod +x afterward!). I'm sure either will work just as well though, so it's up to the OP which one to do.
    Still no work, sigh... Dumbfounded...

  4. #14
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: autorun a shell at/before startup?

    What happens if you run it in a terminal?

    Open a terminal, cd to where that file is and execute it by running:

    Code:
    /path/to/script.sh
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #15
    Join Date
    Nov 2010
    Location
    Shanghai, China
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: autorun a shell at/before startup?

    Quote Originally Posted by CharlesA View Post
    What happens if you run it in a terminal?

    Open a terminal, cd to where that file is and execute it by running:

    Code:
    /path/to/script.sh
    No message echo back, just show another command indicator.

  6. #16
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: autorun a shell at/before startup?

    Quote Originally Posted by WilsonMESS View Post
    Still no work, sigh... Dumbfounded...
    Maybe you will have luck with this? I'm guessing it won't work for you however, given your previous luck with all the other methods mentioned.
    After some playing around, I found the best way to run my startup script was to add it at the end of:

    /etc/init.d/rcS.sh

    The other menthods mentioned did not work for me.
    Last edited by James78; November 21st, 2010 at 08:47 AM.

  7. #17
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: autorun a shell at/before startup?

    Quote Originally Posted by WilsonMESS View Post
    No message echo back, just show another command indicator.
    Ok, so it didn't spit back any errors. Try using the full path to synclient and throwing it in yer user's crontab like so:

    Code:
    crontab -e
    Add:

    Code:
    @reboot /path/to/script
    Reboot and see if it ran the script. If it did, you'd have two-finger scrolling enabled.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  8. #18
    Join Date
    Nov 2010
    Location
    Shanghai, China
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: autorun a shell at/before startup?

    Quote Originally Posted by James78 View Post
    Maybe you will have luck with this? I'm guessing it won't work for you however, given your previous luck with all the other methods mentioned.
    No result, ahhhhhhh... Ubuntu is driven me crazy...

  9. #19
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: autorun a shell at/before startup?

    Does anything happen if you run each command seperately from a terminal?

    Code:
    synclient EmulateTwoFingerMinZ=50
    synclient EmulateTwoFingerMinW=6
    synclient VertTwoFingerScroll=1
    synclient HorizTwoFingerScroll=1
    synclient VertScrollDelta=75
    synclient HorizScrollDelta=100
    synclient RTCornerButton=2
    synclient RBCornerButton=0
    synclient LTCornerButton=0
    synclient LBCornerButton=0
    synclient TapButton1=1
    synclient TapButton2=3
    synclient TapButton3=0
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #20
    Join Date
    Nov 2010
    Location
    Shanghai, China
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: autorun a shell at/before startup?

    Quote Originally Posted by CharlesA View Post
    Does anything happen if you run each command seperately from a terminal?

    Code:
    synclient EmulateTwoFingerMinZ=50
    synclient EmulateTwoFingerMinW=6
    synclient VertTwoFingerScroll=1
    synclient HorizTwoFingerScroll=1
    synclient VertScrollDelta=75
    synclient HorizScrollDelta=100
    synclient RTCornerButton=2
    synclient RBCornerButton=0
    synclient LTCornerButton=0
    synclient LBCornerButton=0
    synclient TapButton1=1
    synclient TapButton2=3
    synclient TapButton3=0
    It works, so I just put these commands separately in the session manager and it works! Thank you soooooo much ~

Page 2 of 3 FirstFirst 123 LastLast

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
  •