First install this on your Android phone:
Now download and extract this zip file on your Linux desktop machine:
Change into the directory of that you just unzipped and issue this command:
java -classpath bluecove-2.1.jar -classpath blucove-gpl-2.1.0.jar -jar PRemoteDroid-Server.jar
On your desktop you will see the app running in the taskbar, from this you can get the IP and password you will need to sync with your phone.
Set up the app on your phone with these details and under "Connections" you should see the connection you just set up. Long press on the icon to bring up a menu and choose "Use".
You should now be able to use your Android phone as a remote mouse and keyboard! Success!