My previous dabbling with xming gave me a way to run remote X applications and have them open windows on my vista desktop. It worked for simple stuff like xterm but for more advanced things like krusader it crashed and burned. So how about having a complete remote desktop open on my vista box, something like vnc but faster? X is supposed to be about this kind of thing, the graphical display being a terminal.
xming supports something called the XDMCP protocol for connecting to remote X servers (my terminology may be all wrong) so how to get that going?
The steps below are for kde, using kdm as a login manager and work with kubuntu.
Firstly, enable XDMCP in /etc/kde3/kdm/kdmrc:
[Xdmcp] # Whether KDM should listen to incoming XDMCP requests. # Default is true # pcw Enable=true
Next make sure the following line in /etc/kde3/kdm/kdmrc is commented out:
#ServerArgsLocal=-nolisten tcp
Next, go into /etc/kde3/kdm/Xaccess and make sure it has something like this in it:
* #any host can get a login window #pcw: this stops it listening on ipv6 (?) LISTEN 0.0.0.0
The ipv6 thing is an old bug. If kdm is listening on ipv6 instead of ipv4 then the following command will give the output shown:
sudo netstat -apn | grep ":177 " udp6 0 0 :::177 :::* 5636/kdm
Next I had to add an entry into /etc/hosts to allow the pc I was connecting from to pass a reverse dns lookup or kdm wouldn't let it in:
192.168.0.32 any-bleeding-thing-will-do
Finally I had to uninstall andlinux from my desktop because the tap/tun driver that it installed was causing xming to ask the remote linux box to connect to the display 192.168.11.1:0 which did not exist on the network, only virtually inside my desktop. This was evinced by the following in the syslog of the remote box:
Jul 31 10:21:10 mybox kdm[5088]: Display 192.168.11.1:0 cannot be opened
After this the xming xlanuch utility can be used to open the desktop with default options apart from:
- use 'One Window'
- 'Open session via XDMCP
- Connect to host = ip address/name of server
This should open a nice big window, as big as your screen with its own kde login prompt. It runs kde4.1 fine, including the kidney in the top right corner. The screen doesn't 'capture' the mouse and I can copy and paste stuff between it and windows.
All this took far too long to figure out (wireshark is my new friend) and by all accounts it is too insecure to trust without a firewall between you and the real world but it is giving me a kde4 desktop that is just as snappy as if I went to the effort of wheeling my chair across to the other side of the room.
It took me some time to learn to spell xdmcp in all my googling until I realised that it can be broken down into xdm-cp and xdm is a more primitive form of kdm/gdm. Googling for xdcmp gives a surprising number of relevant hits.
One remaining oddity: firefox doesn't run. Konqueror does.
UPDATE: it's alarming that an hour after writing this it is coming up in the google results for "xdmcp firefox" so I'd better keep it updated. Firefox does start, it just takes two or three minutes to come up! Coffee time. Netbeans gives a blank white screen. This whole business is a can of worms.
UPDATE2: disabling the vista firewall allows firefox to run nicely. Enabling the firewall and opening ports 177 (udp) and 6000 (tcp) does not work. Running wireshark on a successful session does not reveal any other ports being used. Stumped and NOT running vista without a firewall (ffs). Netbeans still doesn't run. I'd give up only when it is running it runs sooo nicely, much better than vnc. Dragging a window seems to be done in a local terminal rather than downloading bits of screen to redraw over the wire. When it's running, scrolling a firefox page is seamless, you wouldn't know it wasn't running locally. There's gold in them thar hils but they're a long way away.
UPDATE3: after MUCH net tracing, firewall logging and messing about, the Firefox problem is definitely due to the sound activity on port 16001. Unblocking the port for TCP or UDP makes no difference, in fact unblocking ALL ports from a specific IP address doesn't work, there is something in the firewall that is straight broken. However, I found a workaround which is to put this in /etc/profile on the linux end:
declare -x ESPEAKER="127.0.0.1:16001"
it seems to force sounds to stay on the local server.



