The goal of this snippet is to produce a reasonably small Linux virtual machine running inside of VMware customized to my liking.
apt-get dist-upgrade reboot
Install the kernel headers
apt-get install linux-headers-2.6-amd64
apt-get install zsh git-core vim openssh-server openssh-client sudo build-essential
apt-get install xserver-xorg-video-vmware # this will pull a lot of xorg dependencies apt-get install xserver-xorg-input-vmmouse # needed for free mouse roaming between host and guest OS apt-get install xmonad slim # window manager and login manager apt-get install xorg
Edit mouse driver in xorg.conf:
vim /etc/X11/xorg.conf
Change the InputDevice section for the mouse to this:
Section "InputDevice" Identifier "Configured Mouse" Driver "vmmouse" Option "CorePointer" Option "Device" "/dev/input/mice" EndSection
xserver-xorg-input-vmmouse version 1:12.5.1-4 causing the X server to crash on startup. Discover the installed version with aptitude show xserver-xorg-input-vmmouse. Instead, I downloaded xserver-xorg-input-vmmouse_12.5.1-2_amd64.deb from here, and installed it with dpkg -i <filename>
Remove downloaded package files:
aptitude clean
Reboot and log into X as the normal user.
This part is optional. At a minimum, VMware Tools will allow X to readjust resolution dynamically when the VMware window is resized.
From Virtual Machine menu, select Install VMware Tools. This inserts a mountable image at /dev/cdrom.
mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom cp /mnt/cdrom/VMwareTools*.tar.gz /tmp cd /tmp tar zxvf VMwareTools*.tar.gz cd vmware-tools-distrib ./vmware-install.pl
/usr/bin/gcc symlink will have to be changed to the version used to build the kernel.
Create a directory on the host machine to act as the home directory for the Linux VM. This allows you to access your files easily from the host OS. This can be done by:
/mnt/hgfs on the guest (VMware Tools required for this)./etc/fstab and include options uid=1000,gid=1000 on the mount line to give ownership to the first user account.umount /mnt/hgfs and mount /mnt/hgfs to make ownership change/mnt/hgfs/<yourshare>rm /home/<username> to remove the home directoryln -s /mnt/hgfs/<yourshare> /home/<username> to link the mount to the home directory