How to start and show PyQt5 application when boot up ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to start and show PyQt5 application when boot up ?

Jump to solution
1,803 Views
toanjunifer
Senior Contributor I

Hi NXPs,

My name is Toan. I'm using iMX6ULEVK kit. I have done some application with PyQt5. And now I wanna start my PyQt5 appplication automatic when booting. I tried to use crontab with scripts but It's not working property. Camera is light but no frame is displayed. While I use command to run this script is working good.

Anyone can explain and how to fix this issue ?

Thank you very much,

Toan

Labels (1)
1 Solution
1,711 Views
b36401
NXP Employee
NXP Employee

When you are running the application from startup instead of interactively you need to set right value for $DISPLAY variable. I mean something like this:
# export DISPLAY=':0'
And possibly you need to wait some time prior to running the application to allow X server to start.

View solution in original post

3 Replies
1,712 Views
b36401
NXP Employee
NXP Employee

When you are running the application from startup instead of interactively you need to set right value for $DISPLAY variable. I mean something like this:
# export DISPLAY=':0'
And possibly you need to wait some time prior to running the application to allow X server to start.

1,711 Views
toanjunifer
Senior Contributor I

Thank you Victor Linnik,

My PyQt5 application is working good when boot up. But after my UI start, it is inserted by Menu UI. That is new issue. Anyway, thank you for your support.

Best regards,

Toan

0 Kudos
Reply
1,711 Views
toanjunifer
Senior Contributor I

Hi b36401‌,

Thank you for your response. I know the way to have right permission on server X:

$ export DISPLAY=:0.0

I use it to fix my touchscreen using with iMX6UL. But I can not execute this command in script file which I execute it when booting with crontab. I can only execute this script by manual. I mark this file is executable file with "chmod +x" command.

So do you have any trick here ? And may you give me some details ?

Thank you so much,

Toan

0 Kudos
Reply