the*_*guy 7 debian tty raspberry-pi
我目前有 2 个 ttys 自动登录,但我需要在设备加载后立即从一个启动节点脚本和从另一个启动 C 程序。
该设备是运行 Raspbian 的 Raspberry Pi。它设置为像设备一样运行,这两个程序将在设备关闭之前一次运行几个小时。
我已经成功启动了我的程序,/etc/rc.local但这似乎与从 tty 实际启动不同,它们在提示加载之前关闭。
我认为可以从 /etc/inittab 启动任何你想要的东西
例如(/etc/inittab 摘录)
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
# Launch top redirecting its output to tty2, without redirecting input
c2:2345:respawn:/usr/bin/top >/dev/tty2 2>&1
# Launch ascii-invaders with redirected input
# (you will be able to control the game with keyboard after switching to tty3)
c3:2345:respawn:/usr/games/bin/ascii-invaders </dev/tty3 >/dev/tty3 2>&1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5868 次 |
| 最近记录: |