0

I'm trying to open GUI installation from shell without success so I tried first to open just xclock but was unable as well. usually export to DISPLAY solved the problem. I have a haunch that it security related but I lack the right knowledge to debug it.

[grid@localhost grid122]$ export DISPLAY=:0
[grid@localhost grid122]$ xclock 
No protocol specified
Error: Can't open display: :0
[grid@localhost grid122]$ export DISPLAY=localhost:0
[grid@localhost grid122]$ xclock 
Error: Can't open display: localhost:0

Tried different addresses as well:

localhost:0.0
127.0.0.1:0
127.0.0.1:0.0

Also modify /etc/hosts.allow didn't work.

I am using CentOS 7 with GNOME

-1

Answer found here once I understand the problem - I can start xclock from the user I logged in but not from other users. Solution was running xhost + from the user I logged into.

Funny thing is I did xhost + numerous times before.

| improve this answer | |
  • That's a terrible solution unless you are absolutely totally sure your X Server can't be accessed remotely (directly on port 6000 or indirectly by someone logging in to your machine remotely). – roaima Jan 11 '19 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.