Starting an application with framebuffer on startup

Post Reply
facotl
Posts: 51
Joined: Tue Mar 24, 2015 5:06 pm
languages_spoken: english, francais
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Starting an application with framebuffer on startup

Post by facotl »

Hello,

I want to use an Odroid C2 with a unique application that is launcjed on startup. Does someone have a clue ?

Thank you

User avatar
odroid
Site Admin
Posts: 34859
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 933 times
Been thanked: 760 times
Contact:

Re: Starting an application with framebuffer on startup

Post by odroid »

Which OS do you use?

zeta
Posts: 8
Joined: Fri Apr 21, 2017 7:04 am
languages_spoken: english, french
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Starting an application with framebuffer on startup

Post by zeta »

If the question is how to launch the app at startup, one way to do so is by using systemd, with a service file like this:

Code: Select all

[Unit]
Description=YourAppDescription
After=network.target network-online.target YourAppOtherNeeded.target
 
[Service]
User=TheUserYourAppMustRunWith
WorkingDirectory=/Your/App/Working/Directory/
Environment="DISPLAY=:0.0"
ExecStart=/Your/App/Executable
 
[Install]
WantedBy=multi-user.target
In this example, the Environment variable was because it run on an X server (I had a specific target to launch it), so you won't need it here, but I kept it as an example if you need to pass environoment variable to your app. The "After" line here is waiting for network, but you can put whatever your app needs to be ready before starting there.

Then the service must be enable at startup with "systemctl enable yourapp.service". ("systemctl start yourapp.service" only starts it in the current session, not after reboot).

The cool thing with the systemd approach (or SysV if not available) is that it doesn't need a full desktop UI to be running before launching the app.

Does it answer you need ?

facotl
Posts: 51
Joined: Tue Mar 24, 2015 5:06 pm
languages_spoken: english, francais
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Starting an application with framebuffer on startup

Post by facotl »

Hello,

Thanks, i will try asap.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest