我有以下设置:
所以,我现在没有 USB 键盘,我希望能够连接到当前通过复合视频显示到显示器的 tty1。
tty1 在启动时会向显示器显示登录屏幕。然而,即使我可以以不同的方式向 tty1 发送文本,我也无法与该 tty 上运行的底层程序进行交互。
我相信要让
screen
工作,我可能需要在请求登录屏幕之前在 tty1 上启动屏幕会话,但我不知道该怎么做。
我目前正在使用 yocto 烘焙图像。
我尝试过:
# This allows me to type to tty1 but I cannot send line breaks
screen /dev/tty1
# 290 is the agetty process that is probably doing the login - I can see line breaks, but nothing happens afterwards
printf "root\r\n" > /proc/290/fd/0
# This doesn't work at all
printf "root\r\n" > /dev/tty1
这些东西都没有与登录程序交互。
我想在我不小心将 vim 连接到 tty1 后我确实回答了我自己的问题!
# 290 is the pidof agetty
bash > /proc/290/fd/0
# after that, all the bash output will be redirected to tty1