Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a local machine A, and a server B.

from A, I got:

#ps -ef
root      3161  3160  0 09:07 tty1     00:03:04 /usr/bin/Xorg :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-dJExDH/database vt1

#netstat -nltu
tcp        0      0      *                   LISTEN      - 

#xhost +
access control disabled, clients can connect from any host

A's ip address is

From B, I trid:

#export DISPLAY=
Xlib: connection to "" refused by server
Xlib: No protocol specified

Error: Can't open display:

I have another desktop C, if I change the DISPLAY to C's IP address, xclock will work. Any suggestion on what to check in A?

share|improve this question

migrated from Jan 13 '12 at 7:42

This question came from our site for system and network administrators.

Are you using SSH to connect to both? If so, make sure you use the -Y switch to enable trusted X forwarding. – user13742 Jan 13 '12 at 13:00
no, I'm not using SSH, thanks – valpa Jan 16 '12 at 0:41

1 Answer 1

Looks as if xclock tries to connect to the x-server using a tcp connection while the x server is not listening to tcp.

In ubuntu that can be changed by:

sudo gedit /etc/gdm/gdm.schemas



change from true to false:


and then restart gdm.

share|improve this answer
#netstat -nltu tcp 0 0* LISTEN - X server already listen on 6000 – valpa Jan 16 '12 at 0:42
firewall that does rejects instead of drops? – Folkert van Heusden Jan 17 '12 at 0:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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