You are not logged in.
I'm running Plasma/KDE on X. (Wayland does not have this problem; it has other problems so it's not an alternative at this time).
After running the session just fine for some hours, new applications / windows suddenly fail to open. For example, right now:
% firefox
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0
Other apps produce basically the same error message.
What's going on here?
P.S. Just before hitting Submit, I came across this surprising twist: The machine is connected via Ethernet. The built-in WiFi does not connect for some reason (about to post a separate issue on that) but an additional USB-WiFi dongle connects just fine (separate IP address). The twist: the X error message changes depending on whether the dongle is inserted or not:
With dongle: the above error message.
Without dongle (yes, this is the formatting of the error):
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Error: cannot open display: :0
Ideas?
The X server is indirectly started by sddm.service. ps says its command-line is "/usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{xxx} -backgroud none -noreset -displayfd 18 -seat seat0 vt1". If I interpret "-nolisten tcp" as it sounds, how does IP networking aka the dongle even play a role in this?
Last edited by jernst (2018-08-04 04:17:45)
Offline
What is the output of `hostnamectl` and `cat /etc/hostname`? Are you using NetworkManager? Do you make networking changes around the time programs stop launching?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I'm not making any network changes, my network should be behaved as well, except for the dongle experiment. However, it turns out I don't have an /etc/hostname! (no idea why)
hostname produces "archlinux".
hostnamectl says I have a transient hostname "archlinux" but not a static hostname.
Ok, I will set /etc/hostname and see what happens.
Offline
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
It hasn't re-occurred, so I assume setting the hostname fixed it. I'm unclear why a non-network windowing system would depend on the hostname, but then, in the great scheme of things, this does not matter very much.
Offline
X11 is designed from the start as a client-server system. The fact that you run the clients and the server on the same machine is - essentially - coincidence. The hostname is still used in the communication between them so they know which machine to send messages to.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline