The following patch modifies main.c in xterm to use Sequent's own function getpseudotty() to get a pty rather than attempt a hack of pty names. This solves the problem of "xterm myopia"; xterm only being able to see & open a small number of the ptys available on a Sequent. If you have "xterm: no available ptys" when trying to invoke xterm when there are apparently plenty of free ptys around, this patch is for you. It is written by Jaap Vermeulen (jaap@sequent.com, Sequent Computer Systems, Beaverton, Oregon, USA) but is *not* a Sequent supported patch, just a patch by someone in the know. This file was put here with his permission by me, Simon Marshall (S.Marshall@Hull.ac.UK, University Of Hull, UK), in the hope it will benefit Sequent users. These patches are based on MIT X11R4 with fixes 1-18 applied. Assuming that TOPOFXSRCS is the top of the X source tree (parent of mit), type the following to apply: cd $(TOPOFXSRCS)/mit/clients/xterm patch < xterm.sequent.pty.patch If you haven't already, you will also have to add -lseq to the EXTRA_LIBRARIES in the Makefile in that directory. Then remake xterm. *** main.c.orig Fri Aug 9 09:32:14 1991 --- main.c Fri Aug 9 09:42:55 1991 *************** *** 901,907 get_pty (pty) int *pty; { ! static int devindex, letter = 0; #ifdef att if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) { --- 901,909 ----- get_pty (pty) int *pty; { ! #ifdef sequent ! char *t, *p; ! int i; if ((*pty = getpseudotty (&t, &p)) >= 0) { if ((i = strlen(t)) > strlen(ttydev)) *************** *** 903,908 { static int devindex, letter = 0; #ifdef att if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) { return 1; --- 905,927 ----- char *t, *p; int i; + if ((*pty = getpseudotty (&t, &p)) >= 0) { + if ((i = strlen(t)) > strlen(ttydev)) + ttydev = realloc (ttydev, i + 1); + if ((i = strlen(p)) > strlen(ptydev)) + ptydev = realloc (ptydev, i + 1); + if (!ttydev || !ptydev) { + fprintf (stderr, + "%s: unable to allocate memory for ttydev or ptydev\n", + ProgramName); + exit (1); + } + strcpy (ttydev, t); + strcpy (ptydev, p); + return (0); + } else + return (1); + #else /* sequent */ #ifdef att if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) { return 1; *************** *** 911,916 #else /* !att, need lots of code */ #if defined(umips) && defined (SYSTYPE_SYSV) struct stat fstat_buf; *pty = open ("/dev/ptc", O_RDWR); --- 930,936 ----- #else /* !att, need lots of code */ #if defined(umips) && defined (SYSTYPE_SYSV) + static int devindex, letter = 0; struct stat fstat_buf; *pty = open ("/dev/ptc", O_RDWR); *************** *** 966,971 return(1); #endif /* umips && SYSTYPE_SYSV */ #endif /* att */ } get_terminal () --- 986,992 ----- return(1); #endif /* umips && SYSTYPE_SYSV */ #endif /* att */ + #endif /* sequent */ } get_terminal ()