19.QT程序简单的运行脚本
1.led_startup.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: led_startup
# Required: no
# Default: no
# Description: Starts the LED program at boot
### END INIT INFO
# 定义LED程序的路径
LED_PROGRAM_PATH=/root/LED_and_TempHumi
# 检查程序是否存在
if [! -f $LED_PROGRAM_PATH ]; then
echo "LED program not found at $LED_PROGRAM_PATH"
exit 1
fi
export QT_QPA_PLATFORM=linuxfb
# 启动LED程序
$LED_PROGRAM_PATH &
exit 0
加一个运行权限
chmod +x led_startup.sh
原文地址:https://blog.csdn.net/weixin_43756274/article/details/143999359
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!