GNU 屏幕没有响应,似乎被阻止

发布于 2024-10-06 10:10:23 字数 120 浏览 2 评论 0原文

GNU 屏幕似乎冻结了。无法输入用户输入。

我正在使用 GNU 屏幕,当我按下屏幕时,它变得没有响应。我可以执行所有 GNU 屏幕命令,但无法输入用户输入。我不想关闭这个屏幕,因为我有重要的工作,我不想失去它。

GNU Screen seems to freeze. Unable to enter user input.

I was using GNU screen and when I pressed the screen it became unresponsive. I can execute all the GNU screen commands, but can't enter user input. I don't want to kill this screen as I have important work and I don't want to lose it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

酒几许 2024-10-13 10:10:23

在下面的命令中,将 Ctrl 替换为屏幕命令的转义键。

尝试 Ctrl+a q,这是解锁滚动的序列。

Ctrl+a s 是阻止滚动的序列,这使屏幕看起来像是冻结了。

In the commands below, replace Ctrl with whatever your escape key is for screen commands.

Try Ctrl+a q, which is the sequence to unblock scrolling.

Ctrl+a s is the sequence that blocks scrolling, which makes screen seem like it freezes.

深府石板幽径 2024-10-13 10:10:23

使用 PuTTY 时,如果按 Ctrl+s,您可能会看到明显冻结的屏幕。
这会发送 Xoff signal阻塞终端的输出。

解决方案是Ctrl+q发送Xon信号。

When using PuTTY, you can get an apparently freezed screen if you press Ctrl+s.
This sends an Xoff signal blocking the terminal's output.

The solution is to press Ctrl+q to send the Xon signal.

孤者何惧 2024-10-13 10:10:23

如果这是您的问题,上述方法非常有效。

如果您通过 ssh 连接到另一台计算机并且有一段时间没有访问该窗口,那么当您返回时它会被冻结,也可能会发生这种情况。要解决此问题,您可以尝试以下操作:

1) 创建一个新窗口

Ctrl-a c

2) 通过 ssh 进入您之前通过 ssh 连接到冻结窗口中的框。

3) 找到 ssh 正在运行的进程:

ps aux | grep <remote_box_on_frozen_screen>

ps aux | grep <your_user_id>

4) 终止该进程

kill <process_id>

The above works great if that is your issue.

This could also happen if you're ssh'd into another machine and haven't been to the window in awhile, then when you go back it's frozen. To fix this, you can try the following:

1) Create a new window

Ctrl-a c

2) ssh into the box where you ssh'd into the box in the window that's frozen.

3) Find the process the ssh is running under:

ps aux | grep <remote_box_on_frozen_screen>

or

ps aux | grep <your_user_id>

4) Kill the process

kill <process_id>
许仙没带伞 2024-10-13 10:10:23

当您执行 screen -ls 时,屏幕名称的第一个数字是进程 ID。因此,如果输出为

There is a screen on:
    21605.pts-0.Random-server   (11/12/2017 11:44:15 PM)    (Detached)
1 Socket in /var/run/screen/S-kg.

Then this willkill it:

kill 21605

请注意,kill 命令的编号与 screen -ls 输出中的编号相同。

When you do screen -ls the first number of the screen name is the process id. So if the output is

There is a screen on:
    21605.pts-0.Random-server   (11/12/2017 11:44:15 PM)    (Detached)
1 Socket in /var/run/screen/S-kg.

Then this will kill it:

kill 21605

Notice the number for the kill command is the same as in the screen -ls output.

ら栖息 2024-10-13 10:10:23

如果您在状态行中使用反引号命令 - 也就是说,如果您的 .screenrc 有类似这样的内容:

backtick 1 0 60 /some/script.sh

那么您需要确保脚本速度很快:显然反引号执行会阻止所有屏幕 IO。

如果更改配置,则需要重新启动屏幕会话(因为配置仅适用于新会话)。

If you are using backtick commands in status line - that is, if your .screenrc has something like this:

backtick 1 0 60 /some/script.sh

then you want to be sure that the script is fast: apparently backtick execution blocks all IO to screen.

If you make changes to the config, you'll need to restart the screen session (as the config applies only to new sessions).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文