For these functions to execute successfully, the client application must reside on the same host as the X server and/or have been given permission in the initial authorization at connection setup.
To change access control, use XSetAccessControl().
To enable access control, use XEnableAccessControl().
To disable access control, use XDisableAccessControl().