this post was submitted on 08 Jan 2025
11 points (100.0% liked)
linux4noobs
1572 readers
2 users here now
linux4noobs
Noob Friendly, Expert Enabling
Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.
Seeking Support?
- Mention your Linux distro and relevant system details.
- Describe what you've tried so far.
- Share your solution even if you found it yourself.
- Do not delete your post. This allows other people to see possible solutions if they have a similar problem.
- Properly format any scripts, code, logs, or error messages.
- Be mindful to omit any sensitive information such as usernames, passwords, IP addresses, etc.
Community Rules
- Keep discussions respectful and amiable. This community is a space where individuals may freely inquire, exchange thoughts, express viewpoints, and extend help without encountering belittlement. We were all a noob at one point. Differing opinions and ideas is a normal part of discourse, but it must remain civil. Offenders will be warned and/or removed.
- Posts must be Linux oriented
- Spam or affiliate links will not be tolerated.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Explanation: That comes up when you try to run an X11 application (like, pre-Wayland) that doesn't have the proper credentials to authenticate to the X11 display server.
X11 was designed to have a display server (the software that slaps the window on a display) that might live on a machine other than the one running the graphical program. Historically, this was intended so that the display server could run on a very limited "thin client" computer.
Since you don't want arbitrary software on other computers on the network to be able to display things on your display server (and see what's on your screen, and see your keystrokes, which having access to your display server would also permit), some mechanism of saying which machines have access to your machismo was required. Originally, this was done by restricting the IP address, but because there are some potential ways to attack this, what was settled on was the display server and the machine running the application instead having a shared secret, a "cookie" (this particular approach was developed at MIT, hence the "MIT magic cookie" that you see). I'd expect that to show up if the application and display server don't have the same cookie.
In practice, today, most people just display their windows on their local machine.
If, in a bash shell (if you're not familiar with bash, it's the piece of software probably running when you open a terminal window), you type
echo $DISPLAY
, you'll probably see ":0". This means "display 0 on localhost". Something likedisplayserver.foobar.com:1
would be on display 1 on the X11 display served running ondisplayserver.foobar.com
.Okay, enough explanation. How to fix it?
I've never seen this happen when switching WiFi networks, and I'm a little surprised that it shows up for you. The "localhost" hostname should map to 127.0.0.1, which should not be affected by you moving WiFi networks. And I wouldn't expect you to be using something other than localhost -- if you do that transport when not necessary, I think that it might even degrade performance, prevent use of the X11 SHM shared memory extension, which uses shared memory to do rapid data movement between the application and the display server).
The main time I have seen this in the past, it was when I was trying to run software as root after I had run
su
to open a shell run by root on a display that I was running as a non-root user. Usually I could resolve that by running, the commandxauth merge ~/.Xauthority
as root. This merges the current user's cookies (in~username/.Xauthority
) into root's cookies file (in~root/.Xauthority
). If that's what you're seeing, the same command should also resolve the issue.If not...well, the software that you are trying to run is reaching an X11 server, or the message would be different. It's either reaching yours or another one, but it lacks the cookie to authenticate itself. I think I'd run
echo $DISPLAY
in the shell that I'm trying to run that program from, see what it's trying to talk to.EDIT: Sorry, looked at your message again. The X11 software package that you're trying to run is trying to reach ":0", so it's not a matter of that being mis-set. Is there any chance that you're just coincidentally trying to run the program as another user, probably root, and that the WiFi is in fact not related?
Thanks for the answer :)
I'll look at it tomorrow, when I'm at my computer :)