How to Set-up a gameport,gamepad or joystick in Ubuntu

If you want gameport,gamepad or joystick to work in Ubuntu you need to follow this procedure