Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.


  Search this Thread
Old 11-27-2017, 04:54 PM   #1
LQ Newbie
Registered: Nov 2017
Location: Scotland, UK
Distribution: Arch
Posts: 2

Rep: Reputation: Disabled
[SOLVED] NetworkManager causing "unable to open display" errors

During my first Arch Linux installation, I encountered this fairly bizarre error, and a quick google search showed that I wasn't alone. However, none of the posts thrown up by google actually gave any concrete explanation of why this was happening - rather, just vague causes and some rather hack-like solutions. So just in case anyone's struggling with this at the moment, or will encounter it in the future, here's what I found to be the problem, and the solution.

- - The Problem - -

First, some context. I'm running Arch with a Plasma 5 desktop. My networking is being controlled by NetworkManager.service, using the plasma-nm panel applet, with my wi-fi being handled by wpa_supplicant. That all seemed to be running perfectly. However, any time the wi-fi was connected, I was unable to open any applications. They returned 'unable to open display' errors when executed from the konsole, and did nothing at all when executed from an icon in the GUI. As soon as I disconnected the wi-fi and stopped NetworkManager.service, the problem vanished, and I was able to open my programs once more.

- - The Cause - -

After many hours of googling and Konsole-ing, I have arrived at the following conclusion: When NetworkManager.service starts, it looks at the hostname of your system. If it considers your hostname "invalid", it simply assigns your system a new one which it considers more proper (a so-called "transient" hostname). The difference between the transient hostname assigned by NetworkManager and the static hostname specified in /etc/hosts and /etc/hostname is what causes the problem and prevents new windows from opening. There are four hostnames which NetworkManager considers invalid: 'localhost', 'localhost6', 'localhost.localdomain' and 'localhost6.localdomain'.

- - The Solution - -

Simply change the hostname of your system to something which is not considered invalid by NetworkManager. Run 'sudo hostnamectl set-hostname <yournamehere>' at the terminal to do this (substitute the hostname you wish to use for <yournamehere> in the command), then run 'sudo nano /etc/hosts' and change all the instances of the hostname in that file. Save it and close, then reboot. Once your system starts up again, you should be able to connect to the network and open applications at the same time! big_smile

Apologies if you knew all that already; here's hoping at least someone can benefit from my hours of frustration.

PS: The list of invalid hostnames is taken from


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL xhost unable to open display "" seefor Linux - Server 2 05-12-2010 08:02 AM
scp error: xset: unable to open display "" [KIA]aze Linux - Networking 0 07-14-2007 04:18 PM
xset: unable to open display "mycomputer.mynetwork:0.0" nicolaeancuta Linux - Networking 2 07-13-2005 01:39 AM
unable to open display "" while installing oracle remotely cheeku Linux - Newbie 3 08-13-2004 04:08 PM
Samba is behaving poorly and causing "unable to handle kernel paging request" errors system Linux - Networking 6 01-26-2002 08:42 PM > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration