On Wed, 13 Sep 2017 12:05:29 +0200 (CEST) Thomas Danckaert wrote: > since the change to networkmanager, I've been running into the > following problem: when I connect to a wireless network using > networkmanager, I can no longer start graphical applications > (starting any program fails with “cannot open display :0.0” and > similar messages). > > AFAIU, the cause is that networkmanager changes my hostname (after > DHCP?), in my case to “new-host2” or something similar, and this > seems to break the X session. When I manually restore the hostname > with “sudo hostname ”, the problem is solved. Is > there anyway to disable this behaviour for networkmanager? I've had this too, it's very frustrating. Luckilly, I think I found a workaround. I created /etc/hostname and put the machines hostname in it, and I don't think I've had the issue since.