screen error "no more PTYs"
I'm trying to run screen (version 4.0.2-i486-1) on my slackware box, it used to work fine before but now if I launch it as a user (works fine as root) I get these messages
no more PTYs Sorry, could not find a PTY [screen is terminating] |
Apparently it's looking to allocate ptys. Most likely it's a question of permissions on the /dev/pty* devices. Most likely, they should be 666, I believe.
|
Thx for the help Matir, I just checked /dev and theres 257 entries for pty* is this normal? How could I have run out? lol
here's an excerpt of "ls -l /dev/pty*" Code:
lrwxrwxrwx 1 root root 6 2005-03-08 10:17 /dev/ptya0 -> pty/m0 Code:
/dev/pty: |
Here's part of my /etc/udev/rules.d/udev.rules
Code:
# pty devices Also I tried adding myself to the tty group but that didn't help:( |
finally found the solution, just had to
Code:
chmod 666 /dev/ptmx Edit: next problem I had was after starting screen the only command that worked was cd, every other command resulted in "write error: Bad file descriptor" the solution was Code:
chmod 666 /dev/null |
Had a similar problem and found this on google. Unfortunately, changing the permissions did not help in my case. I was able to get screen working after running this command:
Code:
mount -t devpts /dev/ptmx /dev/pts http://www.linuxfromscratch.org/pipe...ay/017234.html Can anyone explain why this works? |
SCO 5 and PTY limitation in SCREEN
Running SCO 5 at work I discovered a limitation to the screen command.
Only 99 PTY's could be used; having over 250 users, this was an issue. Note that this issue will probably also occur using BSD and other Unix variants The reason I wanted this much screens is for a session reliability construction. (Out remote locations had some problem with internet and the local power supplier) I kept getting: No more PTYs followed by Sorry, could not find a PTY. Having browsed through the code I've found a strange piece of code for trying different pty's. The code can be found in the original pty.c file. Below the diff file(s) to limit to number of PTY's through a setting in in the config.h pty.c Code:
< static char PtyProto[] = "/dev/ptypXY"; In order to compile correctly I needed to change the os.h file too: os.h Code:
131c131 and I modified the MAXWIN value: config.h Code:
39c39 |
Quote:
Thanks! |
Quote:
get it's pty's from another location. By mounting the real location to the 'expected' location screen can appearantly retrieve it's pty's successfully. |
Mac solution
When you google "sorry could not find pty" this is the first site that pops up. As I got this error in terminal on my Mac I thought I would post my simple solution, add sudo in front of your command and your good to go. Hope this helps someone...
|
I run Debian (Lenny) and was having the same PTY issue. The solution in my situation was to use MAKEDEV to create a new PTY in /dev as root and thereby facilitate the creation of a new session by a non-root user:
Code:
cd /dev |
All times are GMT -5. The time now is 02:05 PM. |