this post was submitted on 08 Jan 2025
11 points (100.0% liked)
linux4noobs
1495 readers
1 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Typing
xauth merge ~/.Xauthority
did not work :/However, I managed to reproduce the error by changing from my own phone hotspot to the hotspot of my boyfriend. When changing back from my boyfriend's hotspot to my own, I could open applications again. I looked at
journalctl
and I found this. It seems, that when I connect to my boyfriend's hotspot, my hostname is changed to 'boyfriend.telephone-company.com' (changed to preserve a bit of anonymity). When I change back to my own hotspot, the hostname is again changed back to 'archlinux'. It seems weird. I'll try to test again later today with other wifi-connections and see if it only happens with my boyfriend's hotspot. I've had some issues with his hotspot before, so it might just be it.When connection to my boyfriend's hotspot:
when connecting back to my own hotspot:
Hmm.
My hostname doesn't change on connecting to a WiFi network on my laptop.
But
xauth -n list
does have entries that appear to reference my hostname and a unix domain socket. And I do see some people apparently having problems with this after modifying their hostname during an X11 session. Maybe the hostname is a factor here, even when not connecting to a remote machine. Huh.pokes around
It looks like the default behavior for NetworkManager is to set the hostname if you don't have a configured hostname for your machine. I do:
I'm not sure whether yours is "archlinux" or just not specified and "archlinux" is some sort of default that Arch Linux uses on systems with no hostname set.
If it's not set and acceptable to you to set a hostname there, that might be the most-reasonable way to address the issue, if you don't have a hostname set for the machine -- go ahead and edit that file as root, set a hostname in that file, boot the system, and see if your issue goes away. I just have a single word on my system ("talmachine"), not a fully-qualified domain name ("talmachine.domain.com").
It looks like the modern, systemd-friendly way to update a hostname and simultaneously inform running software that the hostname has changed is to run
hostnamectl hostname <hostname>
, sohostnamectl hostname talmachine
or similar. Should have basically the same effect as editing that file, might cause some software to not need a reboot. I'd probably reboot anyway, cause X11 to produce a new magic cookie and such.Looking at
man NetworkManager.conf
, it also looks like it's possible to instruct NetworkManager to not modify the hostname on connection on hosts that don't have a hostname set.So I guess, if you don't want to set a hostname on your system, or one is already set and for some reason you're still smacking into this, you might also try modifying
/etc/NetworkManager/NetworkManager.conf
to read something like:Thanks so much <3
Turns out I didn't have a file at
/etc/hostname
. I created one and now the problem is gone :)Thanks so much for your help <3
No prob. Glad it worked!