Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Screen "Must be connected to a Terminal."

I'm on a Debian OS.

I'm trying to use screen under a SSH session. But when I'm trying to run the command

screen

the shell answer me :

Must be connected to a Terminal.

If I enter

tty

it answer me :

Not a tty

I don't know why and I try

ssh -t login@server

it doesn't work..

Please help me I really need this !

Thanks

EDIT :

I read this topic but it still doesn't work

like image 411
BaptisteL Avatar asked Sep 30 '13 22:09

BaptisteL


People also ask

What is a screen in Terminal?

Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session. Processes running in Screen will continue to run when their window is not visible even if you get disconnected.

How do I connect to SSH screen?

To start a screen session, you simply type screen within your ssh session. You then start your long-running process, type Ctrl+A Ctrl+D to detach from the session and screen -r to reattach when the time is right.

How do I change my screen in Terminal?

Switching Between Screen Terminal Windows When you do a nested screen, you can switch between screens using keys “Ctrl-A” and “n“. It will move to the next screen. When you need to go to the previous screen, just press “Ctrl-A” and “p“. To create a new screen window, just press “Ctrl-A” and “c“.

How do you attach a screen in Linux?

Ctrl-a + r: It reattach a detached screen session.


1 Answers

I had the same problem. If you get this error while in a chroot, here is what helped me:

(run these commands from outside the chroot)

$ sudo mount -o bind /dev /home/chroot/dev
$ sudo mount -t proc proc /home/chroot/proc
$ sudo mount -t devpts devpts /home/chroot/dev/pts

/home/chroot being the path to your chroot, obviously. Update above commands accordingly.

source: http://www.howtoforge.com/forums/showthread.php?t=23583#post128768 (see also http://forums.gentoo.org/viewtopic-t-433006-start-0.html)

like image 169
Yann Dìnendal Avatar answered Sep 20 '22 17:09

Yann Dìnendal