Solved Starting QT app as a Systemd service (another)
-
hi guys. i have a problem very samilar to this link text, the difference of which is i use wayland rather than x server. And i alse found another post link text from toradex.
root@apalis-imx8:~# cat /lib/systemd/system/wayland-app-launch.service [Unit] Description=Start a wayland application After=weston@root.service # ==> weston@.service Requires=weston@root.service # ==>weston@.service [Service] Restart=on-failure Type=forking Environment="QT_QPA_PLATFORM=wayland-egl" ExecStart=/usr/bin/qt-app RestartSec=1 [Install] WantedBy=multi-user.target
here is my weston service configure & my service
so i replace it
then i daemon-reload and start 2110.service. something unfortunate happened!Is the dependency wrong?
-
Hi and welcome to devnet,
Might be a silly question but did you check that you have that platform plugin available ?
-
@SGaist i don't know which paltform plugin is. but if i run the /home/root/2110_12ECGLead_x8 directly, i worked and show ui normally
-
i also found the dependency service of my service, here is the info from journalctl
-
@Yifan-0 The last line of your 2110.service file seems to have a typo
-
somehow,it works well by adding :
Environment="QT_QPA_PLATFORM=wayland" Environment="XDG_RUNTIME_DIR=/run/user/0"
-
-
@ChrisW67 it is the terminal outputs overlaping ,the file's text itself not wrong, my fault!!