找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 258|回复: 0

关于QT程序开机自启动遇到的问题求助

[复制链接]

8

主题

16

回帖

116

积分

注册会员

积分
116
发表于 2024-8-26 21:47:23 | 显示全部楼层 |阅读模式
想要将QT程序开机自启动,写了一个服务,目前状态是开机可以启动,但是会卡死在界面上。
这是home下的lstart.sh启动文件的内容:
root@LoongOS:~# cat /home/lstart.sh
#!/bin/bash
export LD_LIBRARY_PATH=/usr/libLD_LIBRARY_PATH
/home/root/2024822 -platform linuxfb
mount /dev/sda1 /mnt
这是service服务内容
root@LoongOS:~# cat /etc/systemd/system/lstart.service
[Unit]
Description=Run pre-start commands
After=network.target

[Service]
Type=forking
ExecStart=/home/lstart.sh

[Install]
WantedBy=multi-user.target
root@LoongOS:~# systemctl daemon-reload
[  534.366339] systemd-sysv-generator[1687]: SysV service '/etc/init.d/dropbear' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[  534.396974] systemd-sysv-generator[1687]: SysV service '/etc/init.d/psplash.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
root@LoongOS:~# systemctl restart lstart.service

重启开发板后虽然可以直接出现QT界面,但是程序卡死不可运行,求大佬们解答

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2024-11-22 01:11 , Processed in 0.080633 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表