Installing VMware Tools On Debian Lenny 5.0.2 With Gnome Desktop On ESX Server 3.5 Update 4

From time to time, installing VMware Tools on a Linux guest will cause you some grief. While there are lots of howto's, usually they're for VMware Workstation. Here's one that works in Debian/Lenny 5.0.2 on ESX Server 3.5 Update 4.

Important: before making changes on the guest, create a snapshot on your ESX Server. This way you can revert the changes if you get something wrong.


1. Install required Debian packages

On the Debian guest, open a root terminal:

Applications -> Accessories -> Root Terminal

Note: if you've installed the openssh server, you can connect using a Putty/SSH client if you prefer.

Before running the VMware Tools installation script, we need to install a few Debian packages:

apt-get install binutils gcc-4.1-base make linux-headers-$(uname -r)

To allow the vmware-user daemon to start after the install and prevent it from failing thereafter, do the following:

ln -s /usr/lib/ /usr/lib/


2. Copy and extract the VMware Tools installation files to a local directory

On your Virtual Infrastructure Client, from the menu load the VMware Tools virtual CD:

Inventory -> Virtual Machine -> Install/Upgrade VMware Tools

 (You should see a CD-ROM icon appear on your Debian desktop. Just ignore it.)

Create and/or navigate to a directory where you'd like to store the installation files (e.g., /var/installs), then extract the files:

mkdir /var/installs
cd /var/installs
tar zxvf /media/cdrom/VMwareTools-3.5.0-153875.tar.gz

Unmount the CD-ROM by canceling the VMware Tools Install/Upgrade on the VI-Client:

Inventory -> Virtual Machine -> End VMware Tools Install

Ignore the mount error on the Debian desktop by clicking 'Close' on the window that pops up.


3. Install VMware Tools

Important: if you are running a Putty/SSH session connected to the guest, at this point you must run the next three commands from a terminal session inside the guest, otherwise you'll be disconnected by the installation script after it reinitializes the network. In Debian/Lenny, Applications -> Accessories -> Root Terminal.

The VMware Tools Install detects and uses the 'CC' environment variable so it knows which compiler to use. We must specify gcc-4.1:

export CC=/usr/bin/gcc-4.1

(If you make a mistake, you'll be prompted during the install for the right file; no problem, just enter /usr/bin/gcc-4.1.)

Switch to the installation directory and run the installation script:

cd /var/installs/vmware-tools-distrib

Press [enter] on all of the default answers (even the startup display resolution) until the install finishes.

Note: on Debian/Lenny, if you select 1024x768 (the default), it will still boot up in 800x600, which IMO is better on ESX because the console window might not fit a 1024x768 desktop. You can always change the resolution later by going to System -> Preferences -> Screen Resolution.


4. Fixing the mouse

At this point, everything should be configured properly except for the mouse (although the network might be down, type ifup eth0 to bring it up if needed before rebooting). You'll find the mouse to be slow and jittery, and will hesitate going in and out of the guest window. Even after you reboot, it will stay this way, so lets fix it.

Edit the /etc/X11/xorg.conf file:

gedit /etc/X11/xorg.conf &

Comment-out the InputDevice section:

#Section "InputDevice"
#  Driver "vmmouse"
# Identifier "VMware Mouse"
#  Option "Buttons" "5"
#  Option "Device" "/dev/input/mice"
#  Option "Protocol" "IMPS/2"
#  Option "ZAxisMapping" "4 5"
#  Option "Emulate3Buttons" "true"

Copy and paste should now be working between the host and the guest. Copy/paste the following into the xorg.conf file: 

Section "InputDevice"
  Driver     "vmmouse"
  Identifier "VMware Mouse"
  Option     "CorePointer"
  Option     "Device"          "/dev/input/mice"
  Option     "Protocol"        "ps/2"
  Option     "Emulate3Buttons" "true"

Now save the file and quit, then reboot the system:


That's it!

Note: our updated InputDevice section also works in Debian/Etch.

If you continue to have mouse problems:

Make sure the correct vmmouse driver is being used (on my first run, I ran the install differently than outlined here and the mouse driver didn't copy over):

ls -l /usr/lib/vmware-tools/configurator/XOrg/7.3/
ls -l /usr/lib/xorg/modules/input/

If the files are different, do this:

cd /usr/lib/xorg/modules/input
cp -p /usr/lib/vmware-tools/configurator/XOrg/7.3/ .

You might need to fiddle with the InputDevice section in xorg.conf if problems persist. Google for other solutions.


To simulate 1024x768 resolution in a 800x600 window, go to:

System -> Preferences -> Appearance -> Fonts (tab) -> Details...

Change Resolution (dots per inch) to 75 or 76.

Then adjust the icon size:

Applications -> System Tools -> File Browser
Edit -> Preferences

Change Icon View Defaults/Default zoom level to 75%.

Share this page:

Suggested articles

8 Comment(s)

Add comment


By: Anonymous

You're right.  and while we're at it, there should be no documentation on virtualization, GUIs, The GIMP, networking,, the kernel... all because windows has these technologies as well.  Why would it be good for someone to use vmware on a windows host to run Linux, but not the reverse?  tools such as this blur the line and allow people to make choices.  without programs like vmware if I really do need software that is written for windows I would have to dual boot as apposed to simply starting virtual machine.  It's a chicken and egg sort of thing.  to get software you need users, and to get users you need software.

By: Anonymous

The OP holds an excentric view of the world no doubt, but I think you would have been better off reading the article before responding. It is about installing VMWare tools on a Debian guest hosted on WMWare ESXi, a bare metal hypervisor. Windows is not used anywhere.

Anyway, kudos to the article author for taking his time to share his knowledge.


By: Anonymous

Agreed - the OP has not thought about the comments before writing them.

 I found this article extremely helpful - allowing me to use Debian on my ESX cluster so that I may now move many of my VM roles over to linux servers INSTEAD of using Microsoft.

Thank you to the author of the article for sharing his expertise.

By: Anonymous

Yes. This is exactly why I looked this up too. I don't want to use M$oft if I don't have to.

By: Anonymous

Thanks for showing us how to  install freedom restricting bits onto our GNU/Linux operating systems. Articles like this do nothing to help our community and only serve to teach people to value everything Microsoft, Adobe, and Apple can already provide.



By: Anonymous

Thanks for a great article! You forgot to install "killall" (apt-get install psmisc) though.


By: Anonymous

Actually perhaps killall is allready installed if you have Gnome installed. I was installing on an X-less machine when I had to add psmisc.


By: Anonymous

Thanks a lot, it worked without any problem. Even the mouse.