在 beaglebone black上的Linux系统 开机启动自己的QT程序
把自己编译好的mycomtest程序放在/usr/bin/qtopia/myproject
看/etc/init.d下有没有rc.local,没有的话,创建一个,有的话,就在里面直接的exit 0前添加 /usr/bin/qtopia/myproject /mycomtest -qws & ,开机就能启动。
我的机子里没有rc.local文件,则有以下步骤:
#touch /etc/init.d/rc.local
#chmod +x /etc/init.d/rc.local
#vi /etc/init.d/rc.local
#chown -R root /etc/init.d/rc.local
#ln -sf /etc/init.d/rc.local /etc/rc0.d/K999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc1.d/K999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc2.d/S999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc3.d/S999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc4.d/S999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc5.d/S999rc.local
#ln -sf /etc/init.d/rc.local /etc/rc6.d/K999rc.local
/etc/init.d/rc.local的内容为:
#!/bin/sh -e
#
# rc.local