I found that I had to configure KDM in Kubuntu to listen on the network to accept connections to run X. Simply setting the DISPLAY variable on the remote system, typing xhost + on the local system and then running the X application on the remote system would not work.
The key file is /etc/kde3/kdm/kdmrc
In there is a line that says:-
Just comment this out by putting a # in front of the line and restart X by logging out and back in again. Now you can run remote X clients on your local machine as long as you have run xhost + or to be a bit more secure xhost remotehost where remotehost is the name or IP address of the remote host you are working with. (See man xhost for more details).
Bear in mind that there are some security risks to removeing the -nolisten tcp from KDM and if possible you should look at using X Forwarding over ssh, but then like me you may have systems where this isn’t possible.