coLinux + XMing with full networking on a laptop[]

The idea behind this configuration is

  • support TCP/IP server applications running on coLinux
  • use the WLAN to connect to the internet if available
  • have a working X server using XMing even if there is neither LAN nor WLAN.

The approach: I use 3 different network interfaces

  • eth0 = bridged connection attached to the LAN adapter
  • eth1 = tuntap connection for local loopback, using a network
  • eth2 = slirp connection to utilize WLAN

To achieve this we have to define the

coLinux configuration[]

The network configuration for coLinux looks like


My recommendation is to use the MAC address of your LAN adapter plus inverting the highest bit(s) to get an unique MAC address. This is the MAC address visible on you network for the coLinux server applications. So if your MAC address is 00:11:22:33:44:55 use 80:11:22:33:44:55.

Linux configuration[]

Using Debian the network configuration is kept in /etc/network/interfaces. The file contains the information for eth0, eth1 and eth1:

  auto eth0
  iface eth0 inet dhcp

  auto eth2
  iface eth2 inet dhcp

  auto eth1
  iface eth1 inet static 

Other Linux distribution use different ways to store that information, but the scheme is the same:

  • eth0 and eth2 are using DHCP
  • eth1 uses the static IP address

Also modify your environment (e.g. .bashrc) and set the DISPLAY variable

  export DISPLAY=

Windows configuration[]

This is maybe the trickiest part, but it's worth the effort!

First you need 2 TAP Adapters which is pure software (no hardware required). Usually you install one TAP adapter while running the installer for coLinux. If you have no TAP adapter installed you have to do the next step twice.

  1. Open the control panel and start the hardware wizard (or start hdwwiz.cpl directly).
  2. The welcome dialog opens, press continue and it starts searching new hardware
  3. If you are asked whether the hardware is already connected, mark the selection yes, the hardware is already connected and press continue
  4. The hardware assistent now displays a list of devices, scroll down and select add new hardware and press continue
  5. Mark the choice for manually selecting the hardware and press continue
  6. Select network adapters and press continue
  7. Select TAP-Win32 Provider (coLinux) and then TAP-Win32 Adapter (coLinux) and press continue
  8. Now confirm all following dialogs.

After succeeding with that step open all network connections. There should be

  • Wireless Lan Connection - Your wireless chip set
  • Local Area Connection - You LAN chip set
  • Local Area Connection 2 - TAP-Win32 Adapter (coLinux)
  • Local Area Connection 3 - TAP-Win32 Adapter (coLinux) #2

Now simply rename the local area connections using the TAP-Win32 adapter, one into TAP-LAN and the 2nd into TAP-LOOP. Your connections look like:

  • Wireless Lan Connection - Your wireless chip set
  • Local Area Connection - You LAN chip set
  • TAP-LAN - TAP-Win32 Adapter (coLinux)
  • TAP-LOOP - TAP-Win32 Adapter (coLinux) #2

Open the property pages for the TAP-LOOP connection and set the IP properties to

  • address
  • netmask

Now create a network bridge for your local area connection and the TAP-LAN device: Hold the SHIFT key and select

  • Local Area Connection - You LAN chip set
  • TAP-LAN - TAP-Win32 Adapter (coLinux)

Right click and select create network bridge

Xming configuration[]

Locate the file X0.hosts in the program folder of Xming and add the line

to allow connections from your local coLinux.

That's it!

Test your configuration[]

From coLinux you should be able to ping at any time with 0ms response time.

Running Xming allows you to open all X windows in your Windows environment.

If your LAN is not connected during startup of coLinux, it will hang a bit and decide to continue to start with disabled eth0. So use ifconfig eth0 once you connect the LAN to bring the coLinux side up.