You can install ps3xpad using the following command:
sudo apt-get install ps3xpad
sudo modprobe ps3xpad
Separate names with a comma.