[comp.windows.x] XGrabServer etc.

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (12/09/88)

    1. Is there any way an application can make sure that only one copy of
       it is running on a host;

For "host" do you mean client or display?  If display, an application
could, I suppose, store some identification of itself on a private
property on a root window, for later instances to look at.  Of course,
you have to worry about having that property go away when the client
terminals abnormally.  I suppose another approach would be for the
client to assert ownership of a private selection, which then would
go away automatically when the client died.

    2. Is there a way to prevent others users (on other hosts as well as
       the host on which the server's running) from opening up a window on
       the server while I am on?

Nothing in R3, if I understand you correctly (viz. that you want user-based
rather than host-based access control).  On the Consortium staff machines here
at MIT we have a simple connection-level authorization mechanism designed and
implemented, which allows us to control connections to a finer grain than
xhost.  The code has (just) been distributed within the X Consortium for
feedback.  How much it will change, and whether the public will see something
before R4, I can't commit to right now.  (Nor can I commit to when R4 will be.)