What's the right way to call xcb_connect_to_display_with_auth_info() given a Xauthority file?

LaƩrcio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Oct 17 05:55:56 PDT 2014


When I try to establish a XCB connection to a given display stored in a
string e.g. dpy, I know I can do it in two different ways:

   1. Simply call xcb_connect(dpy, NULL), or
   2. Set environment variable DISPLAY to the value of dpy and call
xcb_connect(NULL,
   NULL).

However, if my X server requires a Xauthority file, I can only establish a
XCB connection if I set environment XAUTHORITY to Xauthority file path and
then call xcb_connect(dpy, NULL).

I would like to establish this connection without having to set environment
variable XAUTHORITY. I know there's a funcion in XCB API called
xcb_connect_to_display_with_auth_info() which receives a
xcb_auth_info_t struct,
but I have absolutely no idea of how to build this struct given a
Xauthority file path.

How could I do it?
Thanks in advance!
-- 
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141017/ed61d22d/attachment.html>


More information about the xorg-devel mailing list