Sudo'ing to a user then running screen doesn't work out of the box. Typically you get the following error:
Cannot open your terminal '/dev/pts/1' - please check.
Recently I found an answer to this problem here: http://www.hjackson.org/blog/archives/2008/11/29/cannot-open-your-terminal-dev-pts-please-check
From the blog, here's the procedure
sudo su - someuserscript /dev/nullscreen
Should work now.
6 comments:
Hi.
As your post helped me when I got this error, I'll give you another solution, I think it is the one that is expected to be the right one for screen :
in your screen windows :
(enter screen command mode) CTRL-a :
(allow multiuser) multiuser on
(enter screen command mode) CTRL-a :
(grant access to users) addacl root
The user to grant here is root if you use sudo, but you can give any unprivileged user provided you add screen setuid.
Then as your user attach the screen running by the other user :
sudo screen -x other_user/
There is actually a better option with screen -d -m parameters. Also it is possible to do it with a little hack with chmod + tty command.
I've recently written a short article as I have experienced the same issue as you.
If you want you can take a look at it -
http://www.pc-freak.net/blog/how-to-work-around-screen-cannot-open-your-terminal-devpts1-please-check/
Best,
Georgi
Best tip ever - thanks!
You saved my day!
Thumbs up man
Thanks for your help on this easy fix for sudo accounts!
nice workarround, thanks for sharing
Post a Comment