In my laptop I have a minimal X server installation:# dpkg -l *xorg* *xinit* | grep '^.i'ii  xinit                        1.3.4-1        i386         X server initialisation toolii  xorg-sgml-doctools           1:1.11-1       all          Common tools for building X.Org SGML documentationii  xserver-xorg                 1:7.7+7        i386         X.Org X serverii  xserver-xorg-core            2:1.16.4-1     i386         Xorg X server - core serverii  xserver-xorg-input-evdev     1:2.9.0-2      i386         X.Org X server -- evdev input driverii  xserver-xorg-video-intel     2:2.21.15-2+b2 i386         X.Org X server -- Intel i8xx, i9xx display driver# There is no display manager installed nor a desktop environment. Only minimalistic window manager and X server is sterted with startx command. Now startx calls xauth twice:xauth -q -f $xserverauthfile << EOFadd :$dummy . $mcookieEOF..andxauth -q << EOFadd $displayname . $mcookieEOFFirst one creates the authority file in /tmp/(for example /tmp/serverauth.DrFpkBArQq) and second one creates the authority file in $HOME/.Xauthority. Content of the files can be seen below:# ls -l /tmp/serverauth.DrFpkBArQq -rw------- 1 root root 48 Dec 31 00:41 /tmp/serverauth.DrFpkBArQq# xauth -vf /tmp/serverauth.DrFpkBArQq listUsing authority file /tmp/serverauth.DrFpkBArQqT60/unix:0  MIT-MAGIC-COOKIE-1  16b9dc1ae9969b5a807848b7ade44278# # ls -l $HOME/.Xauthority -rw------- 1 root root 97 Dec 31 00:41 /root/.Xauthority# xauth -v listUsing authority file /root/.XauthorityT60/unix:0  MIT-MAGIC-COOKIE-1  16b9dc1ae9969b5a807848b7ade44278T60:0  MIT-MAGIC-COOKIE-1  16b9dc1ae9969b5a807848b7ade44278# Why there are two authority files?
Why there are two authority files created by startx?
x11