Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Must be connected to a terminal error" with screen -x command on a Linux Container

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>

I got the error:

Must be connected to a terminal error

When I connect with:

ssh -t <user>@<container_ip>

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

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

like image 592
Phoax Avatar asked Sep 13 '16 13:09

Phoax


1 Answers

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

Execute this

script /dev/null

Then you can run screen, et voila

like image 148
Guik Avatar answered Sep 23 '22 19:09

Guik