Linux "mcookie" Command Line Options and Examples
generate magic cookies for xauth

mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage: xauth add :0 . `mcookie` 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.


Usage:

mcookie [options]






Command Line Options:

-f
Use this file as an additional source of randomness. When file is '-', characters are read from standard input.
mcookie -f ...
-m
Read from file only this number of bytes. This option is meant to be used when reading additional randomness from a file ordevice.The number argument may be followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB,ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB=1000, MB=1000*1000, and so onfor GB, TB, PB, EB, ZB and YB.
mcookie -m ...
-v
Inform where randomness originated, with amount of entropy read from each source.
mcookie -v ...
-V
Display version information and exit.
mcookie -V ...
-h
Display help text and exit.BUGSIt is assumed that none of the randomness sources will block.FILES/dev/urandom/dev/random
mcookie -h ...