[comp.windows.x] xhost & close down mode

doyle@b11.ingr.com (Doyle Davidson) (08/28/90)

I was flipping through the MIT - C Language X Interface the other day 
and while reading the part about server resets (2.6), I noticed that 
a server reset occurs when the last client closes it's connection 
and is in close_mode of DestroyAll (default).  But it does NOT happen
with close_mode of RetainTemporary or RetainPermanent.

A common problem that I encounter with novice users of X is their
"ignorance" of server resets.  A common scenario:
    X &			start server
    xhost +foobie	add machine "foobie" to access list
    xhost		show access list - foobie is not there!

Ahh, that good ole server reset strikes again.

So I changed xhost to do an:

	XSetCloseDownMode(dpy, RetainPermanent);

right after the XOpenDisplay and it solved my "problem".

Now just for academic debate, is there anything wrong with
changing the close down mode for xhost?  I can't think of
any resources that are wasted by this.

I know all about XDM and several of the other methods for
starting the server so please ignore them for this discussion.
As a matter of fact I encourage our users to use XDM.

My obligatory:  "I'm running on an Intergraph 6040 under X11 R4 
with patchlevel 14 and I am standing on one foot, patting my head...."

Doyle (SetCloseDownMode(RetainSanity)) Davidson
------------------------------------------------------------------
Doyle C. Davidson              |
Intergraph Corp.               |  These comments are...
Workstation Graphics Standards |
1 Madison Industrial Park      |
Huntsville, AL 35806           |
(205) 730-2000                 |         X-clusively my own.
                               |
..!uunet!ingr!doyle            |
------------------------------------------------------------------

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (08/29/90)

    A common problem that I encounter with novice users of X is their
    "ignorance" of server resets.

Then your novice users have not been pointed at what should be the most
basic documentation: how to get an X session up and running.  If you
aren't teaching them xinit or xdm or something like them, then I'd say
you're teaching them wrong.

    Now just for academic debate, is there anything wrong with
    changing the close down mode for xhost?

Yes, it leads people to a bad idea, and they'll starting putting this
silly line in every X application that *they* happen to run first.

    I know all about XDM and several of the other methods for
    starting the server so please ignore them for this discussion.
    As a matter of fact I encourage our users to use XDM.

The encourage them harder by not giving in to their bad habits. :-)

doyle@b11.ingr.com (Doyle Davidson) (08/31/90)

In article <9008282003.AA09091@expire.lcs.mit.edu>, rws@EXPO.LCS.MIT.EDU (Bob Scheifler) writes:
 
>     Now just for academic debate, is there anything wrong with
>     changing the close down mode for xhost?
> 
> Yes, it leads people to a bad idea, and they'll starting putting this
> silly line in every X application that *they* happen to run first.
> ...
> [they should really be using xdm or xinit]

After more thinking, this point seems to be the best argument that I
have heard to date.  I guess that I'll go delete that test version
of xhost now.

Thanks,

Doyle (hoping this posts because big brother is reducing 
	our netnews feeds to only 'proper' news groups) Davidson
------------------------------------------------------------------
Doyle C. Davidson              |
Intergraph Corp.               |  These comments are...
Workstation Graphics Standards |
1 Madison Industrial Park      |
Huntsville, AL 35806           |
(205) 730-2000                 |         X-clusively my own.
                               |
..!uunet!ingr!doyle            |
------------------------------------------------------------------