How to enable remote access to Xserver on Ubuntu 11.04 and Ubuntu 11.10

First of all remove -nolisten tcp from /etc/X11/xinit/xserverrc file:

cat /etc/X11/xinit/xserverrc 

result:

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

Then:
* Ubuntu 11.04 – with gdm

sudo vim /etc/gdm/custom.conf

File contents:

[security]
DisallowTCP=false

* Ubuntu 11.10 – with lightdm

sudo vim /etc/lightdm/lightdm.conf

File contents:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
xserver-allow-tcp=true

Other useful params of lightdm.conf file:
http://hmontoliu.blogspot.com/2011_10_01_archive.html

Sample rdesktop launcher

#!/bin/bash
#*************************************************
#	2011-10-10 By Piotr Zuk
#*************************************************
# Needed 3rdparty: 
# - http://www.semicomplete.com/projects/xdotool/
#*************************************************

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
TITLE="MyWindowsRemoteDesktop"

#kill previous instance
WID=`xdotool search "$TITLE" | head -1`
for id in $WID; do
  xdotool windowkill $id
done

rdesktop -u piotr.zuk -g 1280x1024 -a 24 -D -T $TITLE 10.2.135.133 &
usleep 800000
WID=`xdotool search "$TITLE" | head -1`
for id in $WID; do
  echo $id
  #xdotool windowsize $id 500 500
  xdotool windowmove $id 0 0
done

to enable sound, just add -rsound:local param.

How to set 24bit colors and antialiasing on WindowsXP client using rdesktop on Linux

Add Keys to Windows registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
“AllowFontAntiAlias”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations]
"AllowFontAntiAlias"=dword:00000001

Run Group Policy Editor (exec gpedit.msc)
In the GPE:
Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Terminal Services
Once you click on Terminal Services look in the right TAB and search for Limit Maximum Color Depth. It will probably have status Disabled by default. Right click on it and go Properties. The Properties window will open up. On the Setting TAB select Enable and at Color Depth select whatever you want (i.e. 24 bit)