§
v<ˆj� ã óP — d Z ddlZddlZddlZ G d„ de¦ « Zd„ Zd„ Zd„ ZdS )zUtility functions for xauth.é Nc ó — e Zd ZdZdS )Ú
NotFoundErrorzError when xauth was not found.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó úh/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pyvirtualdisplay/xauth.pyr r s € € € € € Ø)Ð)Ð)Ð)r
r c ó² — t j ddgt j t j ¬¦ « } | ¦ « \ }}dS # t $ r Y dS w xY w)z3
Return whether or not xauth is installed.
Úxauthz-V©ÚstdoutÚstderrTF)Ú
subprocessÚPopenÚPIPEÚcommunicateÚFileNotFoundError)r
Ú_s r Úis_installedr sq € ðÝÔ Ø
�dˆOå”?Ý”?ð
ñ
ô
ˆð × Ò Ñ"Ô"‰ˆˆ1ð ˆtøõ ð ð ð Øˆuˆuðøøøs ‚AA Á
AÁAc óv — t j d¦ « } t j | ¦ « ¦ « S )z6
Generate a cookie string suitable for xauth.
é )ÚosÚurandomÚhashlibÚmd5Ú hexdigest)Údatas r Úgenerate_mcookier ! s- € õ Œ:�b‰>Œ>€DÝŒ;�tÑÔ×&Ò&Ñ(Ô(Ð(r
c ó¬ — t j dgt | ¦ « z t j t j ¬¦ « }| ¦ « \ }}dS )z)
Call xauth with the given args.
r
r N)r r Úlistr r )Úargsr
r s r Úcallr$ ) sP € õ
ÔØ ˆ •D˜‘J”JÑåŒÝŒð
ñ
ô
€Eð ×ÒÑÔ�D€A€q€q€qr
) r r r r Ú Exceptionr r r r$ r r
r ú