Network Listening for X Server with gdm

How do you enable the X Server for Listening on the Network when using gdm ?

Here is how i managed it under Gnu/Debian Squeeze:

# nano /etc/gdm3/daemon.conf



[security] 
DisallowTCP=false # added this line

Then, remove the '-nolisten tcp' argument from /etc/X11/xinit/xserverrc

# nano /etc/X11/xinit/xserverrc



#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@"

Disconnect your user, change to console 1 (ctrl-alt-F1), restart gdm3:

# /etc/init.d/gdm3 restart