嵌入式爱好者

查看: 14932|回复: 1

[Linux] OK5718 qt程序自启动设置

[复制链接]

9

主题

18

帖子

48

积分

AM5718通行证AM335x通行证

扫一扫,手机访问本帖
发表于 2019-5-5 10:53:38 | 显示全部楼层 |阅读模式
上电启动显示[OK[ Started helloworld  但是我的界面没有启动起来
回复

使用道具 举报

0

主题

15

帖子

35

积分

发表于 2019-6-13 09:34:08 | 显示全部楼层
vi /etc/init.d/matrix-gui-2.0
修改为如下内容
红色字体为添加内容,即启动指令,此例是启动/home/forlinx/qt/下的keypad
紫色字体需要注释掉如下
即可完成自启
#! /bin/sh
matrixgui="/home/forlinx/qt/matrix_browser"
GUI_OPTS="http://127.0.0.1:80/"""
PIDFILE="/var/run/matrix-gui-2.0.pid"
# Important System Environment Variables
for sh in /etc/profile.d/*.sh ; do
    [-r "$sh" ] && . "$sh"
done
/home/forlinx/qt/keypad
#itest -x"$matrixgui" || exit 0
#case "$1"in
#  start)
    #Clear out the the tmp and lock directory
#    cd /usr/share/matrix-gui-2.0
#   rm -rf tmp/*
#    rm -rf lock/*
#    cd -
#       if [ -e $PIDFILE ]; then
#      PIDDIR=/proc/$(cat $PIDFILE)
#      if [ -d ${PIDDIR} -a  "$(readlink -f ${PIDDIR}/exe)" ="${matrixgui}" ]; then
#        echo "$DESC already started; notstarting."
#      else
#        echo "Removing stale PID file$PIDFILE."
#        rm -f $PIDFILE
#      fi
#    fi
#    echo -n "Starting Matrix GUIapplication"
#    start-stop-daemon --start --quiet--background -m --pidfile $PIDFILE --exec $matrixgui -- $GUI_OPTS
#    echo "."
#   ;;
#  stop)
#    echo -n "Stopping Matrix GUIapplication"
#    start-stop-daemon --stop --quiet --pidfile$PIDFILE
#    echo "."
#    ;;
#  *)
#    echo "Usage:/etc/init.d/matrix-gui-2.0 {start|stop}"
#    exit 1
esac
exit 0

点评回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-23 20:22

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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