How come I can't use Screen on a different computer?

2

1

When I use putty, login and type "screen", it works.

When I use a DIFFERENT computer--a linux based system. I SSH into it through my local machine. Then, I type "screen" , and it displays this error?:

'cannot open your terminal '/dev/pts/0' -please check

Alex

Posted 2009-10-21T04:13:38.147

Reputation: 1 751

Answers

5

You've probably su'd to a user different than one you logged in as. You must run screen as the same user which owns the terminal device, which is the user you logged in as.

If you need to run commands as another user, start your screen and do your "su" from inside it.

Teddy

Posted 2009-10-21T04:13:38.147

Reputation: 5 504

i get the same error message when i su to a non-privileged user (other than the one i logged in as) and try to run screen. – quack quixote – 2009-10-21T11:33:35.570

@quack: Uh, yes...? You are not contributing any new information, here. What are you trying to say? – Teddy – 2009-10-21T18:09:22.203

@Teddy: Yes, I did su to the user different than one logged in. If so, can I still use screen? – Alex – 2009-10-23T11:16:18.010

@Alex: Not like that. But you can start your screen and do your "su" inside it. – Teddy – 2009-10-23T13:31:20.520

@Teddy: just verifying your diagnosis, that's all. – quack quixote – 2009-10-23T14:05:42.850

1

Is the machine on which you are having problems known to be particularly "locked down"?

It seems like it might be a permissions problem with your pseudo-terminal. After getting this error message, check the output of ls -l /dev/pts/0 (use the path from the error message). If it does not show you as the owner with read and write bits, then you may check it out with the machine's administrator.

I can imagine a system that would chown-away and chmod-down a pseudo-terminal after the initial login process gets going (sub-processes could inherit the already open file handles for std{in,out,err}), but that would be pretty draconian. What does mount | grep pts show? Maybe the mount options are setup incorrectly…

Chris Johnsen

Posted 2009-10-21T04:13:38.147

Reputation: 31 786

0

Are you trying to reattach the session that was started elsewhere? If so, and the other session hasn't dettached, you need to do screen -d -r <sessionname>.

If it's merely starting screen, then I'm not sure.

warren

Posted 2009-10-21T04:13:38.147

Reputation: 8 599