You are not logged in.

#1 2014-09-25 23:36:54

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

[fixed] can not open display :0?

I don't know which part cause this error, I'm using KDE and intel's driver, everty time I boot the system, run an application, it will fail with "cannot open display". Then I need to log out and log in, then every thing will fine.
    And sometime the system will freeze when wake up from sleep state, lock screen's background is displayed but no password input dialog.
These issues is quite similar, but I just don't know where they are from. But at least this is a system issue, not a single application.

Last edited by ThomasKing0529 (2014-10-07 03:49:35)

Offline

#2 2014-09-26 00:58:44

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [fixed] can not open display :0?

It almost looks like applications are running as root. If that was the case then you would see a similar display error.
So, can you provide a bit more info?
What application/s fail? All apps?
If that is the case, you could run one of the apps from the command line (open konsole and type the app name) and see what other errors you can see when the app fails.

R.

Last edited by ralvez (2014-09-26 00:59:23)

Offline

#3 2014-09-26 03:52:55

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

Actually I run it from Alt+F2 first but with no response, so I open konsole and get this message.
Applications that can generate this error includes wireshark-qt and eclipse and vmplayer, but I think all applications can generate this message.
The most annoying is that I can't easily figure when and how this error raised, it seems random, but I've encountered this message several times.

Offline

#4 2014-09-26 21:30:59

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [fixed] can not open display :0?

OK. But I think we are not communicating.
Open konsole. Then run any of the apps that fail. If the app fails (crashes or whatever it does that tells you that is not working) in the console you should see some message, hopefully, that may give you a clue about what's wrong with running the file. Or your mean to say that the sole message you get if you run the program from konsole is "cannot open display"?


R.

Offline

#5 2014-09-27 23:17:33

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

Sorry to reply so late sad
Yeah, it's now definitely a problem, every time I start system, then every application won't open with this error. And just as I explained, they all tell me they can't open display or just with another message: "No protocol specified". The first time I see this error message is when I install VMware Player.
And now the details of this problem: it will appear after entering KDE desktop, and cause everything with GUI(Qt or Gtk) failed to run. This is not a problem raised immediately: Cause I can run Konsole at first, but then everything including Konsole will not run.

As root privilege cause this problem, and I use sudo to connect to network, maybe this is a bug of Konsole?
Seems not, cause I can get out of this by re-login, this must be a bug of KDE anyway. 

That's all I can supply. In fact, I'm really confused by this problem. And horribly, I'm being used to this problem, I'm being used to log out and log in to get out of this problem.

Maybe this is why I forgot to reply this post, sorry again for this.

Offline

#6 2014-09-27 23:21:55

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

ralvez wrote:

Or your mean to say that the sole message you get if you run the program from konsole is "cannot open display"?


R.

Yes, partly, sure every application fails with different message, they use GUI library in different ways, and same problem cause them throw different message. But the same one between them is "cannot open display :0", and another not so common is "No protocol specified".

Offline

#7 2014-09-28 00:52:35

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [fixed] can not open display :0?

If you are running apps using sudo then yes ... you are going to get that error.
To allow the root user to use your GUI you need to do the following:

1. su to root
2. # vi .bashrc
and put this in it:
    export XAUTHORITY=/home/<user>/.Xauthority
then copy cp /home/<user>/.Xauthority .Xauthority

Messages will be now gone.

R.

p.s. Are you running KDE inside a virtual machine?

Offline

#8 2014-09-28 02:10:48

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

It seems really solve my problem! But I still think this is a bug, cause I didn't run application using root privilege, I just ran a root application and then all application fails with this error(I didn't run these application with root privilege) . This may be a problem of kdm, kdm manages the root prilege? So it mess with the root privilege and cause the applications failed to run?

Offline

#9 2014-09-28 02:15:43

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

And I noticed that the new Xorg introduce a new feature related with root privilege, called rootless login. Is that where this problem raised?

Offline

#10 2014-09-28 02:47:22

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

Well, actually this didn't solve my problem, the same error occurred again . And another error message: When I run konsole from Alt+F2, it tell me"KDEInit could not launch /usr/bin/konsole"

Maybe this message will be some more useful?

Offline

#11 2014-09-28 02:54:43

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

http://www.linuxforums.org/forum/deskto … ivity.html
This post is really similar with my problem, but his problem is caused by remote login, but I'm logging on local host. But I can get out of my problem with log out and log in, so, really similar.

Offline

#12 2014-09-28 03:13:58

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

`xauth list :0` really changes after I log out, it changes from "localhost/unix" to "localhost.localdomain/unix". And now I manually set /etc/hostname, hope this will help

Offline

#13 2014-09-28 03:50:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [fixed] can not open display :0?

Please stop bumping this thread: there is an edit button under every post, learn how to use it
https://wiki.archlinux.org/index.php/Fo … te#Bumping

Read the news about the new xorg-server and how it works.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2014-09-28 05:10:30

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

Sorry about that, I didn't notice that before sad

Offline

#15 2014-10-02 22:59:25

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [fixed] can not open display :0?

ThomasKing0529 wrote:

`xauth list :0` really changes after I log out, it changes from "localhost/unix" to "localhost.localdomain/unix". And now I manually set /etc/hostname, hope this will help

What is currently in your /etc/hosts and /etc/hostname?

It should be something like:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost dragonfly
::1             localhost.localdomain   localhost dragonfly

In my case dragonfly is my system name and a corresponding name exists in /etc/hostname

Offline

#16 2014-10-03 00:15:49

ThomasKing0529
Member
Registered: 2013-12-24
Posts: 16

Re: [fixed] can not open display :0?

I've set my host name and now everything is OK, this is a bug of KDE, I've reported it to KDE community.

Offline

#17 2014-10-03 00:24:33

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [fixed] can not open display :0?

Glad it is working.
Use the edit button in your first post to edit the title and append "[fixed]" to it. That way, other users with a similar problem can use this thread as a reference.

R.

Last edited by ralvez (2014-10-03 00:25:17)

Offline

Board footer

Powered by FluxBB