Start QT Application on bootup on an Embedded Linux Device (Beaglebone Black)

爱⌒轻易说出口 提交于 2019-12-23 05:20:13

问题


Below is picture of the display on bootup. Expected display is overwritten by Angstrom screen

Expected Display

Application is been started as a service. Below is the content of the service file

[Unit]
Description=QTAccelerometer GUI
After=systemd-user-sessions.service

[Service]
WorkingDirectory=/home/root/projects/qt-projects
ExecStart=/home/root/projects/qt-projects/QTAccelerometer -qws
SyslogIdentifier=QTAccelerometer
Restart=on-failure
RestartSec=5

[Install]
Alias=display-manager.service

Below are the other options tried without success

[Install]
WantedBy=multi-user.target
WantedBy=graphical.target

The system sometimes boots up as expected. When the issue occurs the expected screen splashes followed by the Angstrom screen. Then the dynamic widget update the screen but the static information is not visible.

I have posted source code for the application here.

Notes: Angstrom uses systemd as the init manager, per this blog post.

Any thoughts as to how to fix this issue. Thank you in advance

References

  • Creating Ångström System Services on BeagleBone Black
  • UPDATE-RC.D CHEAT SHEET

回答1:


Try the following

[Unit]
After=getty@.service or getty.target

[Install]
WantedBy=multi-user.target

Also consider removing the following from the service file

After=systemd-user-sessions.service
Alias=display-manager.service


来源:https://stackoverflow.com/questions/25701662/start-qt-application-on-bootup-on-an-embedded-linux-device-beaglebone-black

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!