Xpadder allows to control the mouse cursor by using a joystick,gamepad,etc. Xpadder only works on Windows, however I'm not sure if it would work on Ubuntu too, I'm using a XBOX360 Wireless Controller with Xpadder on Windows.
Could Xpadder Work on Ubuntu too?
This is pretty close to Xpadder for linux...
http://qjoypad.sourceforge.net/#introduction
And another...
http://pingus.seul.org/~grumbel/jstest-gtk/