mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage:
The "random" number generated is actually the MD5 message digest of random information coming from one of the sources /dev/urandom, /dev/random, or the libc pseudo-random functions, in this preference order.
It is assumed that none of the randomness sources will block.
X(1), xauth(1), md5sum(1), rand(3)
The mcookie command is part of the util-linux package and is available from Linux Kernel Archive