After running Unbuntu with a Gnome Desktop for about a year, I shamefully have gone back to windows. I still think the true power of Linux lies in the command line tools not its gui. I have found the perfect balance a desktop that’s hassle free (hold the laughs please) and a full feature LAMP and command line.
The Software That Makes it Work
Sun’s Virtualbox: What runs the Linux server (Ubuntu 8.04 server in my case) , running in headless mode (no desktop environment)
Trayit!: Small app that allows to minimize any window to the system tray. In this case the batch window running the vm.
Putty: Gives access the command line for the vm.
Setting Up a Loopback Network Adapter In Windows
To connect to the local Linux server we need to create a virtual network adapter in windows.
To create a loopback adapter:
- Open the control panel.
- Choose “Add Hardware”.
- Click next to scan for new hardware.
- Select “Yes, I have alreadt connected the Hardware. Then click next.
- Scroll all the way to the bottom and select “Add a new hard device”. Then click next.
- Select “Install the hardware that I manually select from a list (Advanced)”. Then click next.
- Select “Network Adapter”. Then next.
- Choose “Microsoft” for manufacturer and “Microsoft Loopback Adapter”. Then click next.
- Finally click next to install the loopback devince. Once installed click finish.
Setting up the loopback adapter:
- Go to the “Network Connections” control panel.
- Find the loopback adapter which should be labeled with something like “Local Area Connection 2” and open up properties.
- Open the “Internet Protocol TCP/IP” properties and enter an IP address and subnet mask outsite your current subnet. For exampl 192.168.20.1 and 255.255.255.0.
- Hit Ok all the way out and our loopback adapter is setup properly.
Setting Up Virtual Box
Creating a Virtual Machine
I won’t go in the details of installing Ubuntu Server but the following settings are important for everything to work.
- In the general section I have used the following:
- Under the basic tab I allocate 256 MB of Ram, and 16 MB of Video Memory (for initial setup) then 4MB for every day use.
- Under the avanced tab make sure you have “Enable PAE/NX” checked. This will preven kernel panic errors when booting up.
- In the Network section I have the follwing adapters setup:
- For Adapter1, select attached to “host interface” and then select “Microsoft Loopback Adapter”. This allows putty to connect to the local Linux server.
- Adapter2, select atteched to “NAT”. This allows the local Linux server to access the Internet.
Installing the Operating System
You can now proceed with the installation of Linux by mounting the Ubuntu Installation CD-ROM in the settings of the virtual machine.
- eth0: needs to have a static IP on the same subnet as the loopback adapter.
- eth1: will obtain its adress through virtualbox to connect to the Internet through NAT.
Starting In headless Mode
Once your virtual machine is running without problems you can create a batch file to launch it in headless mode. Here is what mine looks like:
@”C:\Program Files\Sun\xVM VirtualBox\VBoxHeadless.exe” –startvm “local linux server” –vrdp off
The –startvm “local linux server” options indicates the name of virtual machine to run
The –vrdp off option makes sure virtualbox does not run a remote desktop server (used for graphical desktops).
Also create a batch file to stop the the virtual machine:
“C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe” controlvm “local linux server” savestate
Getting Things Out Of The Way
Now to get Linux to start with Windows I just add te batch files in the “Startup” folder found in the start menu. And to get the batch window out of the way I use a little application called trayit! which lets you laucn applications in the system tray.