invalid MIT-MAGIC-COOKIE-1 error whenever computer falls asleep
Either your cookie file $XAUTHORITY
is getting cleaned up, or maybe your machine name is changing (some aggressive dhcp settings?) so that the wrong thing is getting looked up. Things to check:
Run
xauth info
andecho $XAUTHORITY
to see if your file is someplace that might get cleaned up (like/tmp
).Run
xauth list > xauth.working
, then sleep your laptop, then runxauth list > xauth.broken
. Then rundiff -u xauth.working xauth.broken
to see if anything is changing in your cookie file.
Related videos on Youtube
user1569339
Updated on September 18, 2022Comments
-
user1569339 over 1 year
Whenever my laptop falls asleep and is woken up (Lenovo Thinkpad X1 Carbon Gen 3), certain applications will no longer run. For example, when trying to launch dmenu or google-chrome-stable (XMonad window manager on Arch Linux), I get this error:
Invalid MIT-MAGIC-COOKIE-1
.What does this error mean? I assume it's related to X11. How can I resolve it?
-
Gilles 'SO- stop being evil' almost 9 yearsThat error is indeed related to the X authorization mechanism. An X client needs to present the cookie (a password) to the X server. Normally the cookie is generated when the server starts and stored in a file, either
$XAUTHORITY
or~/.Xauthority
. Is the variableXAUTHORITY
defined in your session? What are examples of applications that keep working? Do any of your dot files (e.g..bashrc
) do anything withXAUTHORITY
or~/.Xauthority
or thexauth
command?
-