How to run application automatically when UDOObuntu starts?

Discussion in 'Linux Ubuntu' started by pho23, Jul 19, 2014.

  1. pho23

    pho23 New Member

    Joined:
    Oct 19, 2013
    Messages:
    2
    Likes Received:
    0
    Hi All,

    I'm asking for your help to make an autorun of an application when UDOObuntu starts.

    Actually earlier it was easy to do on Linaro Ubuntu OS just adding a line in the end of /etc/rc.local script. But now it looks like UDOObuntu v.1 does not launching rc.local at all. Any thoughts?
     
  2. extream96

    extream96 New Member

    Joined:
    Jun 27, 2014
    Messages:
    48
    Likes Received:
    0
    Re: How to run application automatically when UDOObuntu star

    Hi, you wont run a script or an application with GUI?
     
  3. pho23

    pho23 New Member

    Joined:
    Oct 19, 2013
    Messages:
    2
    Likes Received:
    0
    Re: How to run application automatically when UDOObuntu star

    extream96, Yes, you are right.

    Actually, here is the answer:

    1) How to run an application automatically once the Udoobuntu starts
    Open the file manager, go to /usr/share/applications. Right-click on the program you want to be added to your autostart programs, and click Copy. Now, go to ~/.config/autostart, right-click and click Paste. The program should be added to your autostart programs now

    2) How to run a script on startup
    Put the lxterminal in startup folder the same way as it was described before. Open it in leafpad and find a line with Exec command. Change the line to: "Exec=lxterminal -e bash /home/ubuntu/Desktop/my" where 'ubuntu' is a user and 'my' is a script you want to execute. Last step is to create 'my' script on Desktop using a leafpad text editor. A small hint: some time required for udoobuntu to run all processes, so it's better to use "sleep 7" command in your bash script to wait for 7 seconds until you run anything else.

    I believe that my variant is not the best and there are more easier ways to do the same but i hope it will help someone else.
     
  4. mpais

    mpais New Member

    Joined:
    Jan 13, 2015
    Messages:
    1
    Likes Received:
    0
    Re: How to run application automatically when UDOObuntu star

    Hi,

    I was just wondering for the solution above, what did u mean by 'open it in leafpad?' what are we opening to find the exec command?
     
  5. francescomm

    francescomm Member

    Joined:
    Dec 14, 2013
    Messages:
    80
    Likes Received:
    4
    I know this is old, but to clarify, you right click on the lxterminal icon you just copied and pasted, and, in the menu, select "LeafPad" or any text editor entry or "Open With..." and select a text editor. At the bottom of the text that opens you will find the Exec line to change. You may also set the working directory. Mine is like:

    Exec=lxterminal --working-directory="/home/udooer/any/path/to/script/" --command="./mycommandname"
     

Share This Page