cancel
Showing results for 
Search instead for 
Did you mean: 

How can I autostart my QT App on Stm32mp1 boards?

Uusta.1
Associate III

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

3 REPLIES 3
Erwan SZYMANSKI
ST Employee

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
Associate III

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

Erwan SZYMANSKI
ST Employee

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.