Installing Debian Etch (4.0) Stable as a virtual machine within VMWare
Including instructions on installing VMWareTools



Host System
===========
WinXP SP2
Intel, single core


VMWare 
======
Version 5.5.3
  [I found that the VMWareTools didn't configure properly from VMWare 5.5.1]


Debian configuration
====================
Deb version:  Etch 4.0, 2.6.18-4-686


Synaptic packages installed
===========================

[Note: this is not essential]

Emacs
GnuCash
MC
CMake
boost_build
g++

Everything installed flawlessly


VM Ware Tools installation
==========================

Check out www.visoracle.com for additional help and info on Debian installs, especially as pertains to installing as a VM.

First thing to do is make sure you have all the kernel headers installed.
Check for your kernel version:

  uname -a  

This gives me 2.6.18.4-686
Within Synaptic, this can be verified by checking the version of the installed linux-imag
In my case, this reads:  linux-image-2.6.18.4-686

[Kernel version may differ from your machine. The following instructions deal
 specifically with my kernel version. Update as necessary for your machine.]

Install the linux-headers-2.6.18.4-686 package
Install the kernel-package

After this, you should verify in Synaptic that these are installed:
  linux-headers-2.6.18.4
  linux-headers-2.6.18.4-686
  kernel-package

Make a symlink to your linux headers where VMWare expects them:
  ln -s /usr/src/linux-headers-2.6.18-4-686 /usr/src/linux

Set the gcc version to use:
  export CC=/usr/bin/gcc-4.1

Now you're ready to install the tools:

Go to the VMWare menu:
  VM -> Install VMWare Tools

this will force a device to appear as a CDROM.
Mount this cd, copy out the VMWare tools projec to /tmp

  mount /dev/cdrom /mnt/cdrom
  cd /tmp

Untar the VMware Tools tar file, then unmount the 'cdrom'

  tar -zxvf /mnt/cdrom/VMwareTools-5.0.0-<xxxx>.tar.gz
  umount /dev/cdrom

Where <xxxx> is the build/revision number of the VMware Workstation release.

Run the VMware Tools tar installer:

  cd vmware-tools-distrib
  ./vmware-install.pl

Accept all defaults by hitting return.

Should get a message stating that the Tools has been installed successfully.

Then a message stating:

  Before running VMware Tools for the first time, you need to configure it by
  invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
  this program to invoke the command for you now? [yes]

Select yes by hitting return

   Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Trying to find a suitable vmhgfs module for your running kernel.

   None of the pre-built vmhgfs modules for VMware Tools is suitable for your
   running kernel.  Do you want this program to try to build the vmhgfs module for
   your system (you need to have a C compiler installed on your system)? [yes]

   Setup is unable to find the "gcc" program on your machine.  Please make sure it
   is installed.  Do you want to specify the location of this program by hand?
   [yes]

   What is the location of the "gcc" program on your machine? /usr/bin/gcc-4.1

Here I enter /usr/bin/gcc-4.1 (not sure why the export did work for this, too)

   Using compiler "/usr/bin/gcc-4.1". Use environment variable CC to override.

   What is the location of the directory of C header files that match your running
   kernel? [/lib/modules/2.6.18-4-686/build/include]

   Extracting the sources of the vmhgfs module.

   Building the vmhgfs module.

..... bunch of build stuff

Selected the monitor size that was defaulted (1376x1032)

..... more build stuff

   Enjoy,

   --the VMware team

---------------------------------

Uninstaller found here:

  /usr/bin/vmware-uninstall-tools.pl

==================================

Run tools by typing:

  vmware-toolbox &

==================================

Other customization:

---

1) Added Mouse Wheel support to Emacs
  
  Options -> Customize Emacs -> Top Level Customization Group
  Select Editing -> Mouse -> Mouse Wheel Mode toggle to non-nil
  Click on State and then save for future sessions

---


==================================


Problems & Fixes:

---

1) My USB mouse wheel was not working.
   
   Fixed by editing /etc/X11/xorg.conf to read:


Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"IMPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Buttons"		"5"
EndSection

---