Autostart GTK application after boot

Hi,
We are using Colibri iMX7D for one of our products. We have choose GTK3 for the GUI and have successfully completed the software and now we want to run our application in startup immediately after boot in Embedded Linux V2.8b from yocto.
I have followed the below step,

A generic way which many session managers support. Files in the folders /etc/xdg/autostart/ and ~/.config/autostart/ ending with .desktop get parsed and, if applicable, the application described therein is started.

from the link. I am able to successfully start the application automatically but the application starts only after the desktop environment is run. There is a delay around 3 seconds between the desktop environment to show up and my application to start. So there is a chance that our end user can access the file manager in that time before application starts. Our requirement is that the user should not be able to access the OS part and only our application should be running on the device. The time delay is not a problem but we don’t want the desktop environment to show up.

1.Is there a way to start application before the desktop environment shows up or can the desktop session can be disabled?
2. Can we use Embedded Linux console image with GTK3+ recipe added using yocto so that we don’t have desktop environment?
3.Is there any other way of doing this in yocto itself so that it will be useful also in production programming ?

Thanks for your time and support.

Kind regards,
Nishanth Kumar

Hi Nishanth Kumar,

Certainly it is possible to run application without any desktop running. Please check our Linux image with based on BSP version 5.

you may like to start with Reference Multimedia Image

Best Regards

Ritesh Kumar

Hi @ritesh.tx ,

Thanks for your response.
We have added some drivers in BSP version V2.8b6 using Yocto for our application. Is it possible to run the application without desktop in BSP verison 2.8b itself without porting to BSP Version 5 as it will take some time to do that.

Regards,
Nishanth

Hi Nishanth,

It should be possible to run application without desktop as long as appropriate libraries for for ui is in place. In your case GTK.

Please note if application or any gtk library using any component from desktop or has any dependencies it might show strange behaviour. So you need to test it properly.

There is a console-tdx-image with BSP 2.8 which do not have any desktop.

Note: We always recommend to use latest BSP as this is the one with bugs and features fixes which older BSP might not receive or have. Do remember to check change logs from below

Best Regrads

Ritesh Kumar