How exactly is the Xorg MIT-COOKIE being sent by the application to the server - does Xlib do that?
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Oct 17 01:18:50 UTC 2018
On 10/16/18 05:54 PM, Veek M wrote:
> I wanted to feed my cookie to user goof via .Xauthority so I created a
> named pipe to do it. It works BUT very flakily. I found that I need to
> write the cookie numerous times till the application (hexchat/firefox)
> loads completely and then kill the feed-cookie program.
>
> 1. Why do I need to feed the cookie numerous times?
Good question.
> 2. Who is reading the .Xauthority cookie file? Xlib or GTK or the
> hexchat/firefox app?
It used to be libX11, but now it's libxcb which libX11 calls into.
(Both the old libX11 code and the new libxcb code call libXau to
read the .Xauthority file, and they then pass the cookie to the
X server.)
https://cgit.freedesktop.org/xcb/libxcb/tree/src/xcb_auth.c
https://gitlab.freedesktop.org/xorg/lib/libxau
> 3. Anyway to magically/easily feed my cookie to whatever needs in
> (above:2) vs using a named pipe.
Not that I know of.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - https://blogs.oracle.com/alanc
More information about the xorg
mailing list