X server enabling

X server listening for TCP connections

X-windows traditionally uses TCP port 6000 to listen for connections from remote client systems to display on the local X server (console). Use

netstat -na | grep 6000

to see if the server is listening on port 6000. If not, confirm the server is explicitly not listening for TCP connections.

ps -efw | grep X

/usr/X11R6/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

Depending on your distro reconfigure the X server to listen to TCP, and log out or reboot, so the X server is restarted.

Older Ubuntu
In the [Security] section of /etc/gdm/gdm.conf-custom , add the line
/etc/gdm/gdm.conf is overwritten by other automatic events, so any manual changes to that file will be lost.
(newer ubuntu)
On less old ubuntu, this file may no longer exist – try creating instead
/etc/gdm/custom.conf containing just


X on Ubuntu
Change /etc/X11/xinit/xserverrc from
exec /usr/bin/X -nolisten tcp "$@"
exec /usr/bin/X "$@"
Ubuntu with lightdm
Edit /etc/lightdm/lightdm.conf to include
start gdmsetup

On the "Security" tab, uncheck the "Disallow TCP connection" option.

Tell the X server which clients to accept connections from

The xhost command configures for a session which hosts to accept connections from. If you are on a network where you feel safe, the simplest option is to allow all connections. From a console session on the X server issue

xhost +