c - What's the right way to call xcb_connect_to_display_with_auth_info() given a Xauthority file? -
When I try to install a XCB connection for display stored in a string dpy
, I know that I can do this in two different ways to do:
- just
Call xcb_connect (dpy, NULL)
, or < Li> environment variable
display
code> dpy and call xcb_connect (zero, zero)
. But, my X server requires a Xauthority file, I can only install a XCB connection if I environmental set XAUTHORITY
Xauthority file path and then < Code> xcb_connect (dpy, zero) is called .
I want to install this connection without setting the environment variable XAUTHORITY
. I know there is a funcion xcb_connect_to_display_with_auth_info ()
a xcb_auth_info_t
struct in XCB API, but I struct a Xauthority file path for how to make it I do not know at all.
How can I do this?
A xcb_auth_info_t content
struct, XSet Authority
Parameters are similar to
Unfortunately, this is not well documented.
The name is the name of the authorization method (for example "MIT-Magic-Cookie-1"), and data validation data (for example a 128-bit cookie).
would like to avoid using XAUTHORITY
env var, but a .Xauthority file, I think you can use XauReadAuth
. Parsing the Xauthority file and detecting the detection you are connecting to, identifying and extracting the authentication method and data.
Comments
Post a Comment