Unix versions of VMD currently use the serial interface software. At startup time, VMD checks for the existence of an environment variable VMDSPACEBALLPORT. This environment variable must be set to the Unix device name of the serial port to which the Spaceball is attached. The serial port device permissions must be set to allow the VMD user to open the device for reading and writing. In typical usage, this usually requires performing a chmod 666 /dev/somettyname on the appropriate device as root. Once serial port permissions are set correctly, VMD should be able to communcate with the Spaceball at startup. The serial interface software used in the Unix versions of VMD does not presently provide a means of controlling spaceball sensitivity, and the button functions are currently hard coded to reset the view and change the Spaceball mode. One restriction with the use of the Unix Spaceball software is that only one VMD process may safely use the Spaceball at a time. If multiple VMD sessions are started on the same machine and all are set to open the Spaceball, it will likely behave very erratically. The main advantage of the serial interface driver used on Unix over the vendor driver is that it is open source, and supports a much wider variety of machines and operating systems than the vendor drivers do, though its functionality is much more limited. Future Unix versions of VMD may provide support for both the serial interface and vendor-provided drivers.
The Windows version of VMD uses the vendor-provided SpaceWare driver exclusively, and operates somewhat differently from the serial interface software used on Unix. The SpaceWare software runs as a separate process from VMD and must be started and fully operational before VMD is run. At startup time VMD attempts to open the SpaceWare interface, displaying the success or failure of initialization as it occurs, with applicable diagnostic information. The SpaceWare driver provides detailed control over the sensitivity and configuration of the Spaceball. In order to use the Spaceball function keys with VMD the SpaceWare driver must be set to send button events as Function 1 and Function 2 at a minimum. Once set, it should be possible to cycle through the various VMD Spaceball operational modes as described below.
The Spaceball can be run in one of several modes within VMDThe Spaceball interface currently provides two methods of rotation and translation, and a scaling mode. The Spaceball interface currently uses Button 1 (known as Function 1 in the SpaceWare driver) to reset the view, and Button 2 to cycle through the available Spaceball interface modes.