The Sony PlayStation 3 (PS3) uses a USB interface for its controllers. This allows you to connect the controller to your computer without an adaptor. Ubuntu Linux can be used with the controller, but it will require a few additional drivers and some configuration. The PS3 controller uses an open USB device driver. A version of this driver is available on Ubuntu. In order to use the controller, either with games or as an input device, like a mouse, the controller must also be configured with the X11 graphical server.
Click the "Applications" menu, then click the "Accessories" folder and click the "Terminal" option.
Type the following command to install the necessary USB library:
sudo apt-get install libusb-dev libusb-0.1-4
Connect the PS3 controller, then download the "sixpair" driver to your downloads directory (See Resources).
Type the following command to switch to the download directory:
Replace "user" with your user name.
Type the following command to compile sixpair:
gcc -o sixpair sixpair.c -lusb
This will compile the sixpair driver for your system.
Type the following command to run the sixpair set-up:
Disconnect the PS3 controller when the set-up program finishes.
Type the following command to download the utilities required for console integration:
apt-get source bluez-utils && sudo apt-get build-dep bluez-utils
Type the following command to restart the Bluetooth service:
sudo /etc/init.d/bluetooth stop && sudo /etc/init.d/bluetooth start
Type the following command to install the X11 utilities for the PS3:
sudo apt-get install xserver-xorg-input-joystick
The PS3 controller will now be recognised by both the kernel and X11 graphical system. It can be plugged in like any other input device and will control the mouse and work with games.