[comp.windows.x] PS/2 clue

gk5g+@andrew.cmu.edu (Gary Keim) (03/15/90)

I've seen in previous posts that someone has XV11R4 running under AIX on
a PS/2.  I've had less success.  If any of those people are listening....

When I type %xinit -- Xibm, the server outputs the message "Cannot open
/dev/tty to query device id" and then core dumps.  The error msg comes
from server/ddx/ibm/AIX/hftUtils.c: hftQueryCurrentDevice().

    if (hftQFD<0) {
	tempfd = open("/dev/tty",O_WRONLY);
	if (tempfd<0) {
	    ErrorF("Cannot open /dev/tty to query device id\n");
	    return 0;
	}
    }

crw-rw-rw 1 root	system	17,  0 Mar 14 08:50 /dev/tty
-rwxr-xr-x 1 root	system	883040 Mar 13 15:41 /usr/bin/X11/Xibm
-rwxrwxrwx 1 root	system	101111 Mar 13 12:46 /usr/bin/X11/xinit

Has anybody seen this problem before?

Gary Keim
CMU/ITC
ATK Group

jsw@xhead.esd.sgi.com (Jeff Weinstein) (03/15/90)

In article <YZzaudq00VsWQYnF0U@andrew.cmu.edu>, gk5g+@andrew.cmu.edu
(Gary Keim) writes:
>    if (hftQFD<0) {
>	tempfd = open("/dev/tty",O_WRONLY);
>	if (tempfd<0) {
>	    ErrorF("Cannot open /dev/tty to query device id\n");
>	    return 0;
>	}
>    }

	If I remember right the way this code works is if you specify
	a display type on the command line that display is opened and
	the code above is never executed.  If you don't specify a
	display type the server calls the above code to determine
	what screen you ran X from.  As you can see it opens /dev/tty,
	and then trys to do an hft query on it.  Unfortunately 
	xinit appears to dis-associate itself from the controlling
	tty, so the open of /dev/tty fails.

	The easiest way to solve this problem is to specify the display
	type on the command line.  Try one of the following depending
	on what type of display you have:

		xinit -- Xibm -vga
		xinit -- Xibm -8514

	Or, you could just start Xibm directly, not using xinit.  Since
	you have virtual terminals this shouldn't be much of a problem.

		--Jeff

Jeff Weinstein - X Protocol Police
Silicon Graphics, Inc., Entry Systems Division, Window Systems
jsw@xhead.esd.sgi.com
Any opinions expressed above are mine, not sgi's.