How to start and show PyQt5 application when boot up ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to start and show PyQt5 application when boot up ?

ソリューションへジャンプ
1,765件の閲覧回数
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,673件の閲覧回数
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,674件の閲覧回数
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,673件の閲覧回数
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,673件の閲覧回数
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 件の賞賛
返信