How to run a program at boot on minimal Ubuntu image

Post Reply
Sebas_Ledesma
Posts: 140
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2
Has thanked: 13 times
Been thanked: 12 times
Contact:

How to run a program at boot on minimal Ubuntu image

Post by Sebas_Ledesma »

Hi:

We are using Odroid C1 for a new project.
We want to use the minimal distribution.
No monitor will used, instead an 3.2 OLE display managed through SPI, so I have 2 questions:

- How autologin a user? (and then autorun a program)
- How can i run a program at startup? (launch the process under a specific user, no need to pass the login )

Thanks in advance
Sebas

User avatar
odroid
Site Admin
Posts: 35852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1305 times
Been thanked: 908 times
Contact:

Re: How to run a program at boot on minimal Ubuntu image

Post by odroid »

This wiki page might be helpful even the page was written for ODROID-N2.
Try it and let us know the result.
https://wiki.odroid.com/odroid-n2/ubunt ... mi_console
These users thanked the author odroid for the post:
Sebas_Ledesma (Tue Aug 20, 2019 4:40 am)

Sebas_Ledesma
Posts: 140
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2
Has thanked: 13 times
Been thanked: 12 times
Contact:

Re: How to run a program at boot on minimal Ubuntu image

Post by Sebas_Ledesma »

Thanks, both worked!

In the first point "Auto login on HDMI console" I've changed root to myUser.
[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin myUser %I $TERM
Type=idle
In the second part "How to start your application software automatically", I've added myApp that act as discovery service successfully.


Sebas

User avatar
odroid
Site Admin
Posts: 35852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1305 times
Been thanked: 908 times
Contact:

Re: How to run a program at boot on minimal Ubuntu image

Post by odroid »

Thank you for the confirmation and sharing what you did.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 12 guests