Subject: Re: Unable to open terminals in X
To: Ian P. Thomas Ipt <>
From: Steven M. Bellovin <>
List: netbsd-users
Date: 12/20/2001 21:03:30
In message <>, "Ian P. Thomas Ipt" w
>On Thu, Dec 20, 2001 at 08:51:03PM -0500, Steven M. Bellovin wrote:
>> In message <>, "Ian P. Thomas Ipt
>" w
>> rites:
>> >	Mine also have the same permissions.  I was able to get an error
>> >message from trying to execute xterm: 
>> >
>> >xterm:no available ptys: no such file or directory
>> >
>> >	I know this isn't true.  I have ptys listed in /etc/ttys and in /dev.
>> >Do I need to add anything to /etc/ttys?  Here is what my ptys look like in
>> >there:
>> >
>> >ttyp0 	none	network
>> >
>> >	The rest under it are identical.  The tty that X comes up on is listed
>> >as follows:
>> I don't think that the ttys entry matters.  But the error message from 
>> xterm is misleading to the point of uselessness.  xterm (probably) 
>> calls openpty, or does the same thing manually.  The "same thing" is 
>> "loop through all possible pty masters until an open succeeds".  If an 
>> open attempt fails, it checks to see if the cause is ENOENT, which 
>> would indicate that the machine is all out of configured ptys.  The 
>> real question is why it can't open any.
>> You could -- from a console prompt -- try something like
>> 	sleep 5 </dev/ptyp0
>/dev/ptyp0: Device not configured
>	That can't be good.  The strange thing is, I was able to get xterms to
>come when I was using Version 3.3.6.  I just noticed that I have ptys
>commented out in my kernel config.  I'm going to recompile it and see if
>that solves everything.  I must have recompiled the kernel after switching
>to Version 4.1.0.

Sure sounds like it -- and that is quite sufficient to explain 
everything you're seeing.

		--Steve Bellovin,
		Full text of "Firewalls" book now at