3

I was hoping someone could help me understand what happened with my Ubuntu server.

I had an issue with it acting odd, I won't go into detail but I restarted the server with this command:

shutdown -r now

When it came back up, I attempted to use screen and was given this error:

No more PTYs. Sorry, could not find a PTY. [screen is terminating]

I found this website which told me this:

http://en.positon.org/post/%5BScreen%5D-No-more-PTYs-Sorry-could-not-find-a-PTY

You have to change /dev/ptmx file permissions:

# ls -l /dev/ptmx 
crw-r--r-- 1 root root 5, 2 nov 18 23:28 /dev/ptmx
# chmod a+w /dev/ptmx
# ls -l /dev/ptmx 
crw-rw-rw- 1 root root 5, 2 nov 18 23:34 /dev/ptmx

This didn't resolve my issue since I was already at:

crw-rw-rw- 1 root root 5, 2 nov 18 23:34 /dev/ptmx

Same problem.

So I found this post:

https://superuser.com/questions/302235/no-more-ptys-when-trying-to-start-screen

So, I did what the answer suggested, which was:

# mount devpts /dev/pts -t devpts -o mode=620

And it worked fine.

Anyone know what happened, why, and what the devpts did to fix it? I'm completely lost on this one.

Thank you!

3 Answers 3

2

As far as I can tell, /dev/pts needs to be mounted for screen to work.

1

I found this when I ran into the same message. Turns out that I had another application (ZTerm) holding a lock on the device. So, as a tip, make sure that no one else is accessing the device!

1

Problem

Tried to use the screen program to connect my lab PC to a Raspberry PI via the USB ports and an RS232 cable.

Ran the command screen /dev/ttyUSB0

Got the following error messages in quick succession.

Cannot access line '/dev/ttyUSB0 for r/w: permission denied
Couldn't find a PTY

Solution

Finally found this idea of adding to the dialout group looking at this post.

Changing permissions on serial port

Ran the command:

sudo usermod -a -G dialout $USER

Restarted the computer and voila, it worked. Was able to use screen program to make the connection.

Hope this helps someone out. Peace.

1
  • Welcome to Ask Ubuntu. This is a question answer site. This appears to be a good answer, but it is a bit too long with all the things you tried and didn't solve the problem. I will edit it for clarity and formatting. Please format commands as code using the { } icon on top of the Your Answer window.
    – user68186
    Jul 22, 2019 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .