Skip to main content
Uusta.1
Associate III
November 23, 2021
Question

How can I autostart my QT App on Stm32mp1 boards?

  • November 23, 2021
  • 3 replies
  • 1893 views

I installed (OpenSTLinux-Distribution Package) openstlinux-eglfs/st-example-image-qt image to my stm32mp157c-dk2 board, and I successfully run my qt applications. I wonder how can I autostart my qt application after boot or during boot time? I mean I want to see my qt app open after booting process

This topic has been closed for replies.

3 replies

Erwan SZYMANSKI
ST Technical Moderator
February 11, 2022

Hello Uusta,

Sorry for late answer. The easiest way to do what you want to is to create a launch bash script on your board (e.g. launch_my_qt_app.sh) and to place this script in the following folder: /etc/profile.d/

Inside this script you will be able to call the launch of your application (in daemon or not depending on what you want), and you will also be able to export all the different environment variables that you will need for your app (I know that Qt often needs this).

In fact, this folder will run each script that is inside itself after the bootchain, in the userland space. You will certainly see other scripts already inside this folder. If I remember well, scripts are launched in alphabetic order, so to be sure that your application will be launched at the very last moment, I advice you to name your script zz1-my_launch.sh or something like this.

Hope it will help you.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Uusta.1
Uusta.1Author
Associate III
February 17, 2022

Thank you a lot Erwan, I will try this as soon as possible

Erwan SZYMANSKI
ST Technical Moderator
February 17, 2022

Hello @Uusta.1​,

Great, do not hesitate to contact me back if you face any trouble.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.