Open hlolli opened 6 years ago
So I think this is two or maybe even three issues at once [I'm sphalerite on irc! :) ]:
networking.hostname = "localhost";
being equivalent to networking.hostname = null;
; AFAIU only the latter should result in the hostname being acquired via DHCPSo I realized when changing hostname, Xorg needs to authenticate it via login. So a reboot after changing hostname
is needed for Xorg to authorize the new hostname.
Yes, that's part 2 of my explanation. What should also work is using xhost
to authorise the new hostname, or simply restarting only the X server (logging out should be enough for this). Parts 1 and 3 are still problematic though.
Maybe it's connected with the fact that intetutils 1.9.4 is from 2015? I just bumped into this again when changing my hostname for avahi local domains. I can keep it open, but what are the odds someone looks into a year old ticket :D
Higher now that github has a related issues feature ;) it seems there hasn't been a more recent inetutils release though https://ftp.gnu.org/gnu/inetutils/?C=M;O=A
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
no
Might be solved by https://github.com/NixOS/nixpkgs/issues/74847#issuecomment-646160363.
I marked this as stale due to inactivity. → More info
Issue description
On xserver applications I was getting
unable to open display ":0.0"
after connecting to the internet. Seemingly after discussion on the #nixos irc, this is becausehostname
which I set to localhost in my config.nixnetworking.hostname="localhost";
returnslocalhost
but after runningsudo dhclient wlp2s0
, and essentialy connect to the wifi, (useing wpa_supplicant and networkmanager), causeshostname
to return nothing, and all xorg apps to complain about no display ":0.0"Steps to reproduce
sudo wpa_supplicant -B -i wlp2s0 -Dnl80211 -c /etc/wpa_supplicant.conf
sudo dhclient wlp2s0 firefox => unable to open display ":0.0"`
Technical details
ps. a workaround is
sudo hostname localhost