X11R4 from wustl "can't ioctl(): Invalid argument"

Richard Todd rmtodd at servalan.uucp
Sun Oct 7 05:15:35 AEST 1990


jordan at Morgan.COM (Jordan Hayes) writes:

>(By the way, AFE stuck a header on the files even though I used
>"default translation") that I had to get rid of by doing

>	% dd bs=282 skip=1

The reason is that AFE is a MacOS program, and that "default header" is the
resource and info forks of a MacOS style file.  I don't know if you're
familiar with the MacOS concept of file forks; basically, like Gaul, MacOS 
files are always divided into 3 parts, an info fork (which records various
bits of status for benefit of the Finder, I believe), a resource fork
(read Inside Mac for all the sorts of things this part can contain, it's
really too complicated to go into here) and the data fork (just ordinary 
sequential file like most systems have).  Since A/UX, like all other Unix
systems, have only normal, single-forked files, there has to be a standard
way to "include" the resource and info forks of a file when storing a MacOS
file on a Unix filesystem.  Actually, there are two ways, but files created
by MacOS programs always are in the first format, AppleSingle.  

>before I could uncompress ... whatta pain!  I tried "apropos file" and
>"apropos such and such" looking for something that might be of help, like
>"macbtounix(1)" or somesuch)

Admittedly the right command here (fcnvt(1)) has a rather obscure heading 
("convert a resource file to another format"), but they do have a program
there to do it.  What you are after is converting a file from AppleSingle
format (where the resource&info forks of a Mac file are in a "header" on
the file) to AppleDouble (where the resource and info forks are stored in a
separate file and the data fork is left on its own like a normal file).
To convert an AppleSingle file "foo" to an AppleDouble file "bar", you
do 
   fcnvt -i single -d foo bar
This will create two files, "bar" (the data fork from file "foo" sans
header, which is what you want), and "%bar" (the resource and info forks,
which you can immediately rm).  

>So, I followed all the directions of the README file, and I
>double-clicked the X11 shell script, which brought up Commando and I
>just clicked OK, and I get this error message:

>	can't ioctl(): invalid argument

Ah, so you were already in the MacOS environment when you tried to start
X11?  Don't do that.  The deal there is that when the X server (XmacII)
starts up it does some ioctls on /dev/console to do such things as map the
frame buffer for your video card into its address space, activate mouse
input, etc.  Now, the MacOS emulator also has to do the same sort of
things, so it also issues these ioctls.  The reason your X server is
failing is that the MacOS emulator has already "grabbed" the frame buffer
and only one process is allowed to have it grabbed at a time.  (Good thing,
too; I suspect the results of having both graphics servers diddling the
frame buffer would be rather uncool...)  Log out and log back in under 
"Console Emulator" mode.  In this mode, the console isn't doing any special
graphics or the like, so X can start with no problems; just type "X11" at
the shell prompt.  
--
Richard Todd	rmtodd at uokmax.ecn.uoknor.edu  rmtodd at chinet.chi.il.us
	rmtodd at servalan.uucp
Motorola Skates On Intel's Head!



More information about the Comp.unix.aux mailing list