1

Server A -> 192.168.1.25

Server B -> 192.168.1.26

Both running Centos 6.6 with iptables off. No firewall in between.

A$echo $DISPLAY

:0.0

A$xclock

-- Able to see xclock popup on the A screen console

B$echo $DISPLAY

:0.0

B$xclock

-- Able to see xclock popup on the B screen console

=================================================================

Now i want B xclock to show on A.

A$xhost +

Access control disabled, clients can connect from any host

B$export DISPLAY=192.168.1.25:0.0

B$xclock

Error: Can't open display: 192.168.1.25:0.0

I do not want to try X11 forwarding without getting the basic correct.

Please advise.

Regards,

Noob

  • does the error message change when you replace xhost + by xhost -? – Dmitry Grigoryev Jun 18 '15 at 14:02
  • Crosspost - serverfault.com/questions/699979/… – dsolimano Jun 18 '15 at 14:19
  • 1
    netstat -tan | grep 6000 shows nothing. ps -ef | grep X | grep listen on my opensuse 13.2 shows root 1650 1608 5 11:01 tty7 00:03:30 /usr/bin/Xorg -br :0 vt7 -nolisten tcp -seat seat0 -auth /var/lib/kdm/AuthFiles/A:0-7qsBpa. The config file in my case is /etc/sysconfig/displaymanager, look for nolisten or 6000 in it. – Dan Cornilescu Jun 18 '15 at 16:05
  • 1
    superuser.com/questions/560532/…. Yes, that's why it's not working. Donno how/where centos configures it, tho => big hammer approach: find /etc -type f | xargs egrep '(6000|nolisten)' |& grep -v ^grep – Dan Cornilescu Jun 18 '15 at 17:23
  • 1
    Glad to hear. BTW, IMHO it's better from security prospective to leave this method disabled and use SSH with X11 fwding. – Dan Cornilescu Jun 18 '15 at 17:40
3

Summarizing the comments leading to success to an answer...

Some linux distributions (including centos) by default disable direct X access (for which the server would be listening to port 6000 + display num) by running the X server with the -nolisten option. Details here: What is the "-nolisten tcp" parameter for X

If direct X access is desired the server's configuration (dependent on the distribution, /etc/gdm/custom.conf as Noob figured out for his case) can be modified to drop this option and allow the apps to display remotely as expected.

But IMHO it's more secure to use SSH with X11 forwarding instead.

  • 2
    Note that in Xorg 1.17 & later, -nolisten tcp is now the default, and just removing it won't be enough, you'll also need to explictly add -listen tcp as X.Org developers are pushing people to use ssh X11 forwarding instead, as they also believe it's more secure. – alanc Jun 21 '15 at 21:52

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.