HDTenEightyP/NetNews huggingface dataset:
From: feit@ERA.COM (Mark Feit)
Subject: Re: fork and X
Organization: Engineering Research Associates, Vienna, VA
Date: Fri, 31 Jul 1992 14:54:17 GMT

On comp.windows.x, tomasc@lionfish.tds.kth.se (Tomas Carlsson) posts:
 > I'm writing a program that needs to spawn children using a fork
 > and be able to talk to them using a pipe. My problems arise when
 > I want to spawn a second child. The first one is no problem.
 > 
 > The first (X Windows-) thing a child does is make a fontcursor
 > and a pointergrab. This works fine for the first child but the
 > second one kills the whole family. I get these errors before
 > everything exits:
 > 
 > X Error of failed request:  BadIDChoice (invalid resource ID
 >   chosen for this connection)
 > X Error of failed request:  BadCursor (invalid Cursor parameter)

Resource IDs are selected on the client side by an Xlib-internal
routine called _XAllocID, which allocates a unique 32-bit ID based on
some bitmasks acquired when the connection to the server was opened
and a counter which gets incremented on each call.  Whenever you make
an Xlib call that creates a server resource (i.e., one from the
XCreate* family), the routine calls _XAllocID for a new resource
number before shipping its request off to the server.  (IDs are a lot
like files: The file system may create the file itself, but _you_ get
to pick a name to identify it.)

Your problem crops up as a result of the child processes having
separate copies of _XAllocID's internal counter.  For example, if the
last resource ID allocated before you fork was abcd028, the first
child will allocate abcd029.  When you fork again (assuming no
intervening calls to _XAllocID), the second child will get the same
internal counter and will try to create something with an ID of
abcd029, which the server chokes on because it's already been
allocated.

Off the top of my head, I can think of two solutions.

	- Allocate your resources before you fork and don't allocate
	  anything in the children.

	- If you're not forking the same thing several times and your
	  children allocate their own space to work with, switch to
	  lightweight processes.  (Less overhead there, too.)

I've never really given much thought to how X programs that fork or
are run on multiprocessor boxes should work, and perhaps I should
since I may wind up having to deal with it sometime.  I suppose
isolating one copy if Xlib into an RPC service might be one way to go
about it.  Would anyone from the parallel computing world care to
comment on how they handle things like this?

						- Mark

 ................................. .................................
: Mark A. Feit, Software Engineer : Internet: feit@era.com          :
: Engineering Research Associates : USENET: ...!uunet!era!feit      :
 ................................. .................................
 "Software development is 10% science, 25% ingenuity and 65% getting
	       the ingenuity to work with the science."
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.windows.x
Subject: Re: X: User simplicity vs code complexity
Date: 24 Jul 1992 05:57:24 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <TPAQUETTE.92Jul23134924@gumby.ita.lgc.com> tpaquette@ita.lgc.com (Trevor Paquette) writes:
> To open up a window, create a button, attach a callback to that button
> when pushed, released and held, while tracking the mouse, takes up a alot
> of lines of code. (Granted that will take alot of lines in any GFX system
> but most likely more in X then any other)

Someone else already gave the answer I was going to give, about using
higher-level toolkits and application builders.  I wrote my first X client
using XView a few weeks ago; it uses about 120 lines to put up about a
half-dozen menus (some of which are hierarchical) and a couple of text
input panels, and uses *no* Xlib calls.

> Is there ANYONE out there who knows EVERYTHING in
> these manuals?

Der Mouse?
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: graspkm@eng.auburn.edu (Kelly Morrison, (GRASP))
Newsgroups: comp.windows.x
Subject: PD Project Management Tools
Date: 22 Jul 92 14:33:51 GMT
Reply-To: graspkm@eng.auburn.edu
Organization: Auburn University Engineering


Wow! I posted a message last night describing a project management tool developed
here at Auburn and came to school this morning to find a stuffed mailbox full of
inquiries.
   I'll try to contact the three students who wrote the tool today and see if it is
okay to post it for public use. Stay tuned...
                                 -----> Kelly Morrison, Auburn University
From: johnc@cci632.cci.com (John Czyryca)
Newsgroups: comp.windows.x
Subject: How can I share the Standard Colormap VIA xstdcmap command
Date: 29 Jul 92 16:19:08 GMT
Article-I.D.: cci632.1992Jul29.161908.11747
Organization: [Computer Consoles, Inc., Rochester, NY

Occasionally I get the error "cannot allocate space for ... in colormap".  My
documentation says that there is a way to share colormap entries with the use
of the command 'xstdcmap'.   The man-page and other documentation I have, is
not clear on how to use the parameters to the command.  I would appreciate if
anyone understanding this command could ellaborate on its use.

Is there a way to direct each client to maintain its own colormap from the 
command execution line?   Any additional information on this subject would be
appreciated.      
		  Thanks...
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: Help: setting up icon font name in .Xdefaults ruins openwin-init
Organization: McGill Research Centre for Intelligent Machines
Date: Fri, 24 Jul 92 18:24:27 GMT

In article <1992Jul19.115459.20877@u.washington.edu>, sue@byron.u.washington.edu (Shu-Chen Eclipse) writes:

> I dumpted xlsfonts to a file and used textedit to copy some long
> schoolbook font names to my .Xdefaults file, [...].  Problem is the
> lines are then so long that they wrap around to the next line.

> When I next log-in, openwini-init bombs, some tools with these overly
> long lines fail to open with complaints about not being able to find
> the font name fragment on the 1st line [...]

> Quesiton: is there a shorter way to name these fonts, "schoolbook"
> fonts in particular.

That's the wrong fix.  Instead, use a real editor, one that knows how
to deal with lines longer than one screen line.  It sounds as though
textedit actually broke the line into two lines in the file, instead of
just displaying one file line as two screen lines.

> why is this happening, I would have thought that whatever read
> openwin-init would be smart enough to keep reading the whole line and
> not stop at 80 charate4rs, afterall, saveworkspace allowed this to
> begin with.

It probably is.  The problem is, I feel sure, that your editor has
actually broken that long line into two lines.  Use a sane editor like
vi or even ed to join those two lines back together and see if it
doesn't work for you then.

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
From: palermo@cco.caltech.edu
Newsgroups: comp.windows.x
Date: 17 Jul 92 22:56 MDT
Subject: X386 Server won't start
Nf-ID: #N:1992Jul17.185650.949@cco.caltech:-1409753199:001:1029
Nf-From: cco.caltech.edu!palermo    Jul 17 22:56:00 1992


I just built X11R5 on my Interactive 2.2.1 system. I did the
make install into the /usr/X386 tree. When I try to bring up
the server I get the following error
-------------------------------------------------------------
X386 Version 1.2 / X Windows System
(protocol Version 11, revision 0, vendor release 5000)

VGA256: et4000 (mem: 1024k clocks: 25 28 32 36 40 45 50 65)

Fatal server error:
Mode couldn't be resolved: "1024x768"
---------------------------------------------------------------

I looked through all the descriptions of the X386 server. I ran
the install.sh script provided in the mit/servers/ddx/x386/etc
directory.  The config notes in the x386 dir said there has to be
a copy of the Xconfig file in /usr/X386, there wasn't, so I copied
the one provided over.

I have an Orchid Pro Designer II video card which is supported.
I currently run the X11R3 I got from Interative, so I sure the 
video card should work.

Any help would be greatly appreciated 

Please send any repsonses to bob@popeye.jpl.nasa.gov
From: blevins@orgel.informatik.uni-stuttgart.de (Brian Blevins)
Newsgroups: comp.windows.x
Subject: The future of X?
Date: 30 Jul 92 17:00:55 GMT
Distribution: comp
Organization: Informatik, Univ. Stuttgart. W.Germany

Hi,

After writing some Xlib code, reading this group for a while, and browsing
through the latest FAQs I could find, I'm still left with a couple of
questions and a meta-question concerning the future of X.

First, the meta-question:

Where can one (is it possible to) find out what research/advancement
of the protocol is occurring without having to subscribe to the journals?
Being a student, I'm not part of an organization that is likely to
join the X Consortium any time soon and the technical conference next
year is very likely to be out of my price range (as well as being next
year).
(I'm already considering the Journal option, and was thinking more along
the lines of FTP here.)  


Ok, now the normal questions:

1. What information (functionality, proposals, etc.) is available about
   the next release (X11R6?) ?

2. Will there or should I ask "could there" be a next version (X12R0?) ?
   I know, given the size of the current market, producing anything
   not X11 compatible would seem silly...

3. Can motion video and audio be incorporated into X11 or will they
   require a risky attempt to create an X12?  (Actually, one could
   argue that the hardware for video and audio either aren't available
   or aren't standardized enough to even consider incorporating
   these new functions into the standard protocol, but I don't
   believe it.  That's what drivers are for.)


So, that's probably too long already... E-mail me if you like, but
these seem like great post subjects to me.

Thanks for the bandwidth and the information!

Brian,
the expatriot Wramblin Wreck

W. Brian Blevins                  | blevins@orgel.informatik.uni-stuttgart.de 
Institute for Parallel and Dist.  | telephone: +49-711-682886
High-performance Computing        | address: Pfaffenwaldring 42D/3.1
Informatik Institute              |          D-7000 Stuttgart 80
                                  |          (Germany)
------------------------------------------------------------------------------
These are my opinions, wholly my opinions, and probably nothing but my opinions...

--
Brian,
the expatriot Wramblin Wreck

W. Brian Blevins                  | blevins@orgel.informatik.uni-stuttgart.de 
Institute for Parallel and Dist.  | telephone: +49-711-682886
High-performance Computing        | address: Pfaffenwaldring 42D/3.1
Informatik Institute              |          D-7000 Stuttgart 80
                                  |          (Germany)
"Computer Science is merely the post-Turing decline in formal systems theory."
------------------------------------------------------------------------------
These are my opinions, wholly my opinions, and probably nothing but my opinions...
Newsgroups: comp.windows.x
From: elder@enuxha.eas.asu.edu (Greg Elder)
Subject: Still Have Problem on Sun
Organization: Arizona State University
Date: Tue, 21 Jul 1992 18:42:11 GMT

I'm still having problems getting an X program to link on a Sun workstation.
Again, this is a program which links and runs fine on a DEC ULTRIX
workstation, which I would like to have run on a Sun as well.  Below is
the command line I use to link everything, with the resulting error
message:

cc -o map -O -I/usr/openwin/include -L/usr/openwin/lib map.o initapp.o
xwinutil.o xbutton.o -lXm -lX11 -lXt

ld:  undefined symbol
        __XtInherit
        _XtToolkitInitialize

I haven't been able to figure out why this error pops up.  Aren't these
two routines in libXt.a?  I'm new to using Suns, so please let me know if
I'm missing something that is obvious.  Any help is appreciated.  Thanks.


--
  Greg Elder               | "Artificial intelligence?!!!  I'd rather
  Dept of Computer Science | have real intelligence." 
  Arizona State University |                      -- Ann Elder
  elder@enuxha.eas.asu.edu |  
Newsgroups: comp.windows.x
From: dan@watson.ibm.COM (Walt Daniels)
Subject: re: Memory leaks
Organization: The Internet
Date: Wed, 29 Jul 1992 19:07:30 GMT

> When is a memory leak a memory leak. If I do many malloc's with
>no dalloc's , does the memory remain leaked when the program exits?
>Is the answer different in different OSs such as Sun,SCO etc... ?
>Sinan

I know of no OS that doesn't clean up at process end.  [Unless your
system is really broken and processes can cause kernel memory leaks.]
However the X server process rarely (hopefully never) ends so server
memory leaks are a severe problem.  Similarly some user processes are
long running so a client side leak will eventually cause problems.

There is another effect besides leaks that happen for programs.
Malloc works by using sbrk to create a large area that is then broken
into smaller pieces as necessary.  When that space runs out sbrk is
called to get another large piece.  If lots of free's occur and the
topmost sbrk region is free it could be returned (and some but not all
systems do).  Thus the storage may become fragmented and the sbrk
boundary may increase indefinitely until you start having problems.
Typical programs that may show such anomolous behavior in this area
are ones which repeatedly get a large area for an image then release
it and get a small piece that comes out the previously big enough
piece for the image.
From: killoran@ll.mit.edu (Mike Killoran)
Newsgroups: comp.windows.x
Subject: Quick way to view available colors?
Date: 22 Jul 92 17:22:48 GMT
Reply-To: killoran@ll.mit.edu (Mike Killoran)
Organization: MIT Lincoln Laboratory
Originator: killoran@ll.mit.edu (Mike Killoran)

Hi,

I administer a few workstations running X.  Yesterday
a new user asked my about changing the colors I had
set as the defaults for xterm.  I showed him rgb.txt
to give him all of the names of colors, and he asked
it there was a program to quickly view these colors.

Is there?

I know about xfontsel and it seems like it would be
nice to have some program to view (or even create and
then see the rgb values for) colors.  Even better if
it would let one see how one color text looks on top
of a different color background.


Mike Killoran
killoran@ll.mit.edu
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: GXcopy and GXxor
Keywords: GXcopy and GXxor
Organization: McGill Research Centre for Intelligent Machines
Date: Thu, 30 Jul 92 00:08:39 GMT

In article <xia.711911424@odin>, xia@molbio.ethz.ch (Xia Tai-he) writes:

> I have created a GC with function GXcopy and another GC with GXxor
> for drawing rubber-band lines,

> I also set the foreground colors for the two GCs.

What did you set them to?  Getting the foreground pixel value wrong is
the commonest problem with GXxor.

> However, the lines drawn with the second GC don't have the color I
> have set, whose colors differ depending on the objects alreay
> existing on the screen.

That's the way GXxor works: it XORs the foreground value in the GC with
the value that's already there.  It's up to you to make sure that the
result is what you want.  (XOR is useful for rubber-band lines because
it's easy to invert - it's self-inverse.  But of necessity, this means
that different pixel values underneath the rubber-band end up being
different pixel values when rubber-banded over.)

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
From: craig@cactus.org (Craig T. Anderson)
Newsgroups: comp.windows.x
Subject: Xstones: how to determine/what's important?
Date: 28 Jul 92 14:45:34 GMT
Organization: Capital Area Central Texas UNIX Society, Austin, Tx

I'm looking for a program or some reference for determining Xstones for
a new server.

I'm also interested in what particular operations the Xstones benchmark
uses heavily in determining it's number.  (i.e. what do we optimize
most to get the highest Xstones?  lines?  blits?  everything?)

-Craig
-- 
Craig Anderson     craig@cactus.org
From: bri@black-coffee.ai.mit.edu (Brian Totty)
Newsgroups: comp.windows.x
Subject: ??? FWF Volunteer Request ???
Date: 29 Jul 92 17:40:23 GMT
Organization: MIT AI Laboratory, Computer Architecture Group


	The Free Widget Foundation (FWF) is looking for volunteers
	interested in helping to produce a top-quality set widgets
	available to the public at no cost.

	The Free Widget Foundation began two years ago as a volunteer
	effort to gather a set of free widgets for use in building complex
	user interfaces.  We currently have a set of widgets available
	via ftp from a.cs.uiuc.edu in the directory ~ftp/pub/fwf.shar.Z,
	and have a mailing list of nearly 200 members.  Several X
	applications now use the FWF library.	

	The FWF is currently extending itself from being an ad hoc widget
	repository, to an organized effort to produce a powerful, complete
	widget set.  Our goal is to have an initially extended and
	reorganized widget set available at the end of 1992.  

	If you are interested in helping with the effort, would like to
	be added to the mailing list, or would just like more information
	on the Free Widget Foundation, please send mail to:

		free-widgets-request@kazoo.cs.uiuc.edu
From: tmcconne@sedona.intel.com (Tom McConnell)
Newsgroups: comp.windows.x
Subject: Re: X11R5 on RS/6000 (AIX 3.2)
Keywords: help
Date: 31 Jul 92 18:38:46 GMT
Reply-To: tmcconne@sedona.intel.com
Organization: Intel Corporation
Originator: tmcconne@sedona


In article <64716@hydra.gatech.EDU>, ccoprdg@prism.gatech.EDU (Drew Gonczi) writes:
> I have X11R5 pl 11 running on a IBM RS 6000.  We are running AIX 3.2.
> 
> When I run startx (or xinit), the server starts, but nothing else 
> happens.  After I kill the server (ctrl-atl-backspace), I see the message
> that xinit cannot connect to server.
> 
> Any Ideas on what the problem is?
> 
> 
> -- 
> Drew Gonczi         
> Operations Dept - Office of Information Technology
> ccoprdg@prism.gatech.edu      

  Press "Alt-Ctrl/Act" to check to see if X is on another hft.

  My guess is (assuming that your .xinitrc leaves something like xterm or twm
in the foreground) that the R5 server really does start, you just don't see it :)
Try using the "Alt-Ctrl/Act" key sequence to check to see if X is running on
another hft.

  The "problem" is that the R5 server from the MIT X11R5 distribution for the
RS/6000 does something comparable to the "open" command. It actually starts X on
another hft. So, if you wanted to, you could do "startx &" to start X on hft/1,
and still have a prompt on hft/0. I would not recommend this in general.

    Cheers,

    Tom McConnell
-- 
 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-21     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.
From: kaleb@thyme.jpl.nasa.gov
Newsgroups: comp.windows.x
Date: 17 Jul 92 22:45 MDT
Subject: Re: 3d Athena problems (was Re: Need 3d
Nf-ID: #R:1992Jul17.134010.27312@csi.uotta:603785719:1992Jul17.184529.20266@thyme.jpl:-2056943204:001:2262
Nf-From: thyme.jpl.nasa.gov!kaleb    Jul 17 22:45:00 1992


In article <1992Jul17.134010.27312@csi.uottawa.ca> dominic@shamin.genie.uottawa.ca writes:
>
>...but any Khoros applications that I like with this die with:
>
>X Error of failed request:  BadFont (invalid Font parameter)
>  Major opcode of failed request:  55 (X_CreateGC)
>  Minor opcode of failed request:  0
>  Resource id in failed request:  0x2400016
>  Serial number of failed request:  42
>  Current serial number in output stream:  44
>Major X error encountered for display 'scooter:2.0'! Unable to recover.
>
>Any ideas?
>

The first question that comes to mind is: What is the Khoros app doing
wrong that *every* app in the MIT sample implementation does right? :-)

The second question that comes to mind is: You don't expect me to answer
your question with the scant information you've provided, do you?  Not to
mention the fact that you've posted to the net, and not emailed me.
While I currently make every effort to stay on top of c.w.x, I may not
always be able to do so, and it's a mistake to assume that I will.

But seriously -- why not run the app with "-synchronous" in whatever
passes for a debugger in SCO and determine whether it's the app, or the 
widget set that's generating the error, and then let either the app writer, 
or *me* know what you found?

(Need I point out that you'll need to compile both the app and the widget
set with debugging turned on!)

Remember folks.  I'm not the X Consortium.  I don't have one of everything 
worth having to try Xaw3d on (well, I'm sure even the X Consortium doesn't 
have one of *everything*, either.)  And I'm doing this is my "spare" time, 
so I can't try every app that was ever written for Xaw either.  I test with 
the supported clients in the R5 Sample implementation; and that's it.  If 
they work, I have to presume that other correctly written applications will 
too.  

Furthermore, I have a Sun, (and soon I hope to have BSD386-0.1) and that's 
it.  If you want Xaw3d to keep getting better, then you'll have to provide 
more useful information, and *preferably* the fixes, for the things that 
you do find wrong.

Thank you for your support.

-- 

Kaleb Keithley                          kaleb@thyme.jpl.nasa.gov

Not authorized, in any way, shape, or form, to speak for anyone.

Newsgroups: comp.windows.x
From: rohit@NeoSoft.com (Rohit Mehrotra)
Subject: Drag 'n Drop
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Thu, 30 Jul 1992 13:08:29 GMT

XView

Can someone please tell me how to use the DND facility with XView 3
so that I can give textedit the name of the file to be read rather
than sending it a string ?

Ive implemented Drag n drop for my application and I can quite happily
accept data from textedit (either by pasting it in or by reading
the file when I drop onto my drop-site target).

However doing the reverse seems to rely on undocumented Sun facilities.
Specifically I am trying to understand the use of the TARGET atoms.
Normally data comes in as a XA_STRING, however textedit uses the
_SUN_HOST_NAME (is that spelled right?) and _SUN_FILE_NAME atoms
amongst others. If you do a strings of textedit or do an xlsatoms
you will see lots of _SUN* atoms which are not documented.

How can I copy a file to textedit without sending it the contents of
the file via the X-server.

The problem is that if I send anything to textedit it inserts it into
the current file rather than editing the new file I want it to.

If anyone knows of any example programs which use DND and can happily
talk to textedit this way then please point them out to me. 

Anyone know of any archives with good examples of the XView tricks of
the trade ?

I find the O'reilly book really a pretty poor document (Vol 7 rev 3). 
The sources from X11R5/contrib are NOT the same as suns so
they arent too helpful either.

Thanks in advance


Rohit Mehrotra

PLEASE EMAIL ME YOUR ANSWER AND I WOULD POST A SUMMARY.
-- 
Rohit Mehrotra
------------------------------------------------------------------------------
VITAL				| 	10755 Meadowglen Lane, #238
Ph: 713-781-7406		| 	Houston, TX 77042.