Subject: Re: Unable to open terminals in X
To: NetBSD-User <>
From: Ian P. Thomas Ipt <>
List: netbsd-users
Date: 12/20/2001 20:55:48
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.

> and see how it fails.  If it succeeds, it points the finger of blame at 
> X, rather than the system.  If it fails, the exact error message is 
> likely to be much more useful than the one you're seeing.  If it 
> succeeds, try running the 'script' command, since that uses ptys and 
> wasn't touched by your upgrade.  Another possibility is to run 'script' 
> under 'ktrace'.  Doing the same with xterm would be even better, but 
> perhaps infeasible.
> It could, of course, be something as simple as a missing (for some 
> reason) ptyp0 entry in /dev, at which point it would give up.  But 
> let's try to localize the problem.
> 		--Steve Bellovin,
> 		Full text of "Firewalls" book now at

Of Course It Runs NetBSD

Do You Yahoo!?
Get your free address at