How to start and show PyQt5 application when boot up ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start and show PyQt5 application when boot up ?

Jump to solution
93 Views
Contributor V

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 View
NXP TechSupport
NXP TechSupport

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
2 Views
NXP TechSupport
NXP TechSupport

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

1 View
Contributor V

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
1 View
Contributor V

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