Autostart a script on startup

Discussion in 'Linux Ubuntu' started by PieterV, Jan 25, 2017.

  1. PieterV

    PieterV New Member

    Joined:
    Nov 19, 2015
    Messages:
    9
    Likes Received:
    1
    Hi all,

    I've read a thread here and on the web on how to run a script (*.sh) automatically when the system is starting up. But it's still not clear.

    The script is named *.sh and has the following lines in it:
    #!bin/sh
    sudo /etc/init.d/ueyeusbdrc start
    exec /QtProjects/project/project
    project is just a executable application
    What and where do I need to copy/modify things to get this working?

    I believe that when this well documented it will be a benefit for a lot of members.

    Thanks
     
  2. sombunall

    sombunall Member

    Joined:
    Jul 16, 2016
    Messages:
    31
    Likes Received:
    4
  3. PieterV

    PieterV New Member

    Joined:
    Nov 19, 2015
    Messages:
    9
    Likes Received:
    1
    Ok, I found a solution on this and I want to share this with you all.

    Just place the shell script in "/etc/profile.d/" and it will start after auto login of Udoobuntu.

    Just keep in mind that in some cases you will be stuck in the loop that once you close the executable and you want to log in with guest or udooer it will open again the script and do nothing more than that. Maybe I forget something to enter in the last sentence of my script which causing this.

    Have fun!!
     
    Andrea Rovai likes this.

Share This Page