“必须连接到终端错误"在 Linux 容器上使用 screen -x 命令 [英] "Must be connected to a terminal error" with screen -x command on a Linux Container

查看:18
本文介绍了“必须连接到终端错误"在 Linux 容器上使用 screen -x 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 Proxmox 4 的 Linux 容器.当我连接到 Ubuntu 16.04 容器时:

I am using Linux containers with Proxmox 4. When I am connected on an Ubuntu 16.04 container with:

pct enter <id>

我运行一个带有屏幕的脚本并尝试观察正在运行的进程:

I run a script with screen and try to watch the process running with:

screen -x <processname>

我得到了错误:

必须连接到终端错误

当我连接时:

ssh -t <user>@<container_ip>

它可以工作,我可以将显示器附加到屏幕上.

It works, I can attach the display to the screen.

当我使用 pct enter 连接时,如何使用 screen -x ?

How can I use screen -x when I am connected with pct enter ?

推荐答案

我找到了适用于相同情况的解决方案(https://www.svennd.be/screen-in-lxc-attach)

I found a solution that works for same case(https://www.svennd.be/screen-in-lxc-attach)

执行这个

脚本/dev/null

script /dev/null

然后你可以运行屏幕,等等

Then you can run screen, et voila

这篇关于“必须连接到终端错误"在 Linux 容器上使用 screen -x 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆