1 1.1 mrg VMMouse 2 1.1 mrg ------- 3 1.1 mrg 4 1.1 mrg The VMMouse driver enables support for the special VMMouse protocol 5 1.1 mrg that is provided by VMware virtual machines to give absolute pointer 6 1.1 mrg positioning. 7 1.1 mrg 8 1.1 mrg Installing the driver will improve the user experience when using the 9 1.1 mrg mouse to interact with the guest operating system. In particular, use of 10 1.1 mrg the driver improves mouse "lag", provides mouse speed and acceleration 11 1.1 mrg consistent with the user's host operating system, and enables the 12 1.1 mrg auto-grab/ungrab feature in VMware products without requiring the VMware 13 1.1 mrg toolbox application. 14 1.1 mrg 15 1.1 mrg Using the driver 16 1.1 mrg ---------------- 17 1.1 mrg 18 1.1 mrg Assuming you have built and installed the driver in the standard way 19 1.1 mrg for autotools based packages (see INSTALL), or the driver was already 20 1.1 mrg installed by your distro, using it is simply a matter of changing the 21 1.1 mrg driver used for the mouse input device from "mouse" to "vmmouse". 22 1.1 mrg 23 1.1 mrg The vmmouse driver is capable of falling back to the standard "mouse" 24 1.1 mrg driver if a VMware virtual machine is not detected. This allows for 25 1.1 mrg dual-booting of an operating system from a virtual machine to real hardware 26 1.1 mrg without having to edit xorg.conf every time. 27 1.1 mrg 28 1.1 mrg Implementation 29 1.1 mrg -------------- 30 1.1 mrg 31 1.1 mrg The following is not necessary reading for anyone who wants to use the 32 1.1 mrg driver, but should help anyone who wants to understand how it works or 33 1.1 mrg who wants to write a driver for a different target, whether it's another 34 1.1 mrg operating system, a linux kernel input driver or even gpm. 35 1.1 mrg 36 1.1 mrg The driver is composed of three different layers: 37 1.1 mrg 38 1.1 mrg 1) The vmmouse protocol layer (vmmouse_proto.[c|h]) 39 1.1 mrg - This provides the call to read and write the port over which 40 1.1 mrg the vmmouse packets are transfered. 41 1.1 mrg 42 1.1 mrg 2) The vmmouse client layer (vmmouse_client.[c|h]) 43 1.1 mrg - This builds on top of the protocol layer to provide higher 44 1.1 mrg level calls for enabling/disabling the vmmouse mechanism 45 1.1 mrg and for reading data. 46 1.1 mrg - A new driver for a different target would use this interface. 47 1.1 mrg 48 1.1 mrg 3) The Xorg vmmouse driver (vmmouse.c) 49 1.1 mrg - This is the actual Xorg specific part of the driver. 50 1.1 mrg - Note that interrupts indicating the presence of mouse data 51 1.1 mrg are still transmitted on the PS/2 port so it is necessary 52 1.1 mrg to be set up to receive those interrupts like a standard 53 1.1 mrg PS/2 driver, but the actual data on the PS/2 port is ignored. 54 1.1.1.2 mrg 55 1.1.1.2 mrg vmmouse_detect 56 1.1.1.2 mrg -------------- 57 1.1.1.2 mrg 58 1.1.1.2 mrg A simple program to detect whether the vmmouse device is present. 59 1.1.1.2 mrg It is used by the HAL callout script to automatically detect a 60 1.1.1.2 mrg vmmouse device. 61 1.1.1.2 mrg 62 1.1.1.2 mrg Returns 0 if we are running in a virtual machine where the vmmouse 63 1.1.1.2 mrg device is present. 64 1.1.1.2 mrg 65 1.1.1.2 mrg Returns 1 otherwise (either we are not in a VM or the vmmouse device 66 1.1.1.2 mrg was disabled). 67