How to start and show PyQt5 application when boot up ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to start and show PyQt5 application when boot up ?

跳至解决方案
1,739 次查看
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

标签 (1)
1 解答
1,647 次查看
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.

在原帖中查看解决方案

3 回复数
1,648 次查看
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,647 次查看
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 项奖励
回复
1,647 次查看
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 项奖励
回复