XDMCP in VirtualBox

This is for discussing general topics about how to use VirtualBox.
Post Reply
kpedersen
Posts: 7
Joined: 22. Apr 2008, 17:04

XDMCP in VirtualBox

Post by kpedersen »

Hello,

I have been trying to get XDMCP working within VirtualBox for some time. I have forwarded the TCP and UDP ports which I think are needed because the network type is NAT:-

Code: Select all

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6000
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6000
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6001
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6001
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6002
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6002
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6003
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6003
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6004
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6004
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 6005
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 6005
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/xdmcp/HostPort" 3333
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/xdmcp/GuestPort" 177
VBoxManage setextradata OpenSolaris "VBoxInternal/Devices/pcnet/0/LUN#0/Config/xdmcp/Protocol" UDP
And I have setup XDMCP on the OpenSolaris guest (I can connect inside the VM locally using Xephyr).

But when I issue the following command on the host, it doesn't do anything (just stays at a black screen)

Code: Select all

Xephyr :1 -query localhost -port 3333
Has anyone else managed this?

Best Regards,

Karsten
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: XDMCP in VirtualBox

Post by Perryg »

What version of VirtualBox?
kpedersen
Posts: 7
Joined: 22. Apr 2008, 17:04

Re: XDMCP in VirtualBox

Post by kpedersen »

The Version is 3.2.12_OSE r68302 which is the latest in the FreeBSD ports collection.

Though if the solution is with another version on another host platform, then I am quite happy to migrate.

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: XDMCP in VirtualBox

Post by Perryg »

The syntax for the port forwarding is different than the ones you are trying to use. (older version of VirtualBox)
See Chapter 6.3.1 Configuring port forwarding with NAT in your VirtualBox users manual to see how it is properly done with this version.
kpedersen
Posts: 7
Joined: 22. Apr 2008, 17:04

Re: XDMCP in VirtualBox

Post by kpedersen »

Ok, the new setup uses

Code: Select all

VBoxManage modifyvm "OpenSolaris" --natpf1 "guestssh,tcp,,8022,,22"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestxdmcp,udp,,8177,,177"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx0,tcp,,6000,,6000"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx1,tcp,,6001,,6001"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx2,tcp,,6002,,6002"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx3,tcp,,6003,,6003"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx4,tcp,,6004,,6004"
VBoxManage modifyvm "OpenSolaris" --natpf1 "guestx5,tcp,,6005,,6005"
I have added ssh forwarding to test if it works as it did using the previous method and it has no trouble connecting

But I still cannot connect to the guests XDMCP session from the host.

Code: Select all

Xephyr -port 8177 :1 -query localhost
Just sits there with a black screen.

is it something to do with the ports 6000-6005 conflicting with my current running xserver?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: XDMCP in VirtualBox

Post by Perryg »

You might want to look at the machine.xml and make sure that with all the changes you don't have conflicting statements now. BE SURE to back it up first before you edit it.
kpedersen
Posts: 7
Joined: 22. Apr 2008, 17:04

Re: XDMCP in VirtualBox

Post by kpedersen »

Yes, made sure to clean out the .xml file before.

It seems to be working fine for ssh, so I am beginning to think there is either an issue with udp or the ports which xdmcp directs the client to.

as a temporary workaround I am using ssh/X to forward the remote Xephyr (or Xnest)

Code: Select all

ssh -p 8022 -X -C -l karsten localhost -n /usr/X11/bin/Xephyr :1 -ac -once -query localhost
Some websites say this is preferable anyway since it does a small amount of compression.
Post Reply