Tag Archives: shell

screen for normal linux user not working, but…

While playing with a development server at work, we just came across an error message like this:

Cannot open your terminal '/dev/pts/0' - please check.

So, there seemed to be rights-related problem, and searching the web brings up quite a lot of forum entries about this topic, with maily this two solutions:

  1. open screen as root and then sudo to user
  2. make /dev/pts/0 writable for the user

I didn’t want to try the first one, because that might allow the user to fall back to root, so I tried the second one. At first it worked, but when I completely closed the user’s session, /dev/pts/0 seemed to be gone, and the next try failed again, so it’s not a permanent solution.

The solution (that worked for me):

But finally I came across another solution that worked like a charme: you just need to SSH onto the machine directly with the desired user, and then it’s no problem to open a screen.

In our previous tries we had logged in as root and then sudoed to the user, which caused this problem. Maybe I’ll investigate some alternatives or eventually more in-depth information about why this works this way, but for now I’m quite happy that we have a working solution.