遇到的问题:
有时候我们需要Qt程序在嵌入式平台自启动,于是我们把Qt应用程序放到/etc/profile中自己开机启动的程序,但是不能自启动,往往需要在超级终端敲回车,因为出现了"Please press Enter to activate this console"这句命令,等待用户输入回车才能进入Qt程序
解决问题的办法:
从开发板的角度讲,一般只要在/etc/init.d/rcS中加入你的程序或者脚本命令就可以实现开机自动运行;想在超级终端输入回车,登录后执行,则可以在/etc/profile中加入命令;如果想去掉每次开机完后的“Please press Enter to activate this console”这句,也就是实现开机自动登录,可以在/etc/inittab中仿照busybox中example的inittab写,只是将::askfirst:-/bin/sh改为::respawn:-/bin/sh即可,如果发现没有inittab文件那么就自己建一个,其他的板子可以根据自己的情况修改脚本,都差不了多少.
inittab脚本如下:
::sysinit:/etc/init.d/rcS ::respawn:-/bin/sh
参考:http://blog.csdn.net/w7849516230/article/details/6426350
参考:http://blog.csdn.net/sun_rise2011/article/details/7973514
文章的脚注信息由WordPress的wp-posturl插件自动生成
微信扫一扫,打赏作者吧~![[已解决]nc命令报错 close: Bad file descriptor](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2022/03/Snipaste_2022-03-18_20-16-48.png&w=280&h=210&zc=1)
![[整理]how to run flask with pyqt5](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2021/03/pyqt_flask.png&w=280&h=210&zc=1)
![[已解决]SecureCRT/SSH 连接Linux缓慢](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/07/ssh_slow.jpg&w=280&h=210&zc=1)
![[转载]Linux的tickless设置](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.litrin.net/wp-content/uploads/2018/11/kernel_menuconfig_tickless-1.png&w=280&h=210&zc=1)