You are not logged in.

#1 2018-10-20 09:36:35

mlkewlj
Member
Registered: 2016-04-02
Posts: 8

[SOLVED] Plasma: Could not connect to display :0

I am running 4.18.14.arch1-1 on a Lenovo ThinkPad X1 Yoga (I think 1st generation) with plasma-desktop 5.14.1-1 and with kwin-script. Since the last update, I am having the problem that shortly after bootup, I can not open any GUI-applications anymore. An example:

$ okular /data/Downloads/201807161102.pdf & 
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.

and another example

$ emacs CM.tex 
No protocol specified
Display :0 unavailable, simulating -nw

Google returned hits concerning problems when accessing remotely via SSH. I am however having the problem locally.

A list of the peculiarities encountered:

  • In the beginning, I can open an application or two, but afterwards it starts failing. I can not open konsole, vlc a.s.o.

  • Selecting shutdown or reboot via the menu does not have any effect either. In order to shut down, I run the command through the "run command interface" (Alt+Space).

  • Waking the screen from sleep, I get the message that the screen can not be unlocked, so that I have to log in to a parallel (?) session, type

    $ loginctl unlock-session 2

    and return back to the original session.

  • At the same time, Firefox started to show a page saying

    Sorry. We just need to do one small thing to keep going.
    
    We have just installed an update in the background. Click Restart Firefox to finish applying it.
    
    We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.

    when attempting to load a website. However, this does not happen for all websites. Happened for example when restoring the tab containing the archlinux forum search. Happened for other websites before, but not now, where it happened for the forum search. I don't see any pattern. Possibly happens for all websites after some time.

Last edited by mlkewlj (2018-10-20 11:07:06)

Offline

#2 2018-10-20 10:46:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] Plasma: Could not connect to display :0

What's the output of

hostnamectl

? The main cause of this is an incorrect hostname and if you use NetworkManager having drops or changes in connectivity will result in incorrect hostname resolution. Don't use localhost, set your hostname

If that isn't it, elaborate on how you start X/Plasma in the first place and post

printenv | grep DBUS
journalctl -b

Offline

#3 2018-10-20 11:05:16

mlkewlj
Member
Registered: 2016-04-02
Posts: 8

Re: [SOLVED] Plasma: Could not connect to display :0

$ hostnamectl
Static hostname: n/a
Transient hostname: archlinux
Icon name: computer-convertible
Chassis: convertible
Machine ID: ***
Boot ID: ***
Operating System: Arch Linux
Kernel: Linux 4.18.14-arch1-1-ARCH
Architecture: x86-64

I set a hostname and I think the problem is solved. Am I right in assuming that

Static hostname: n/a

is the crucial line?

Thank you, I mark it as solved. Would never have figured that out without the forums.

Offline

Board footer

Powered by FluxBB