How to Setup a Bitcoin miner?
To mine bitcoins use cpuminer (click here) and avoid any graphical application: a console application is faster and doesn't need much memory. This may be the reason why bitcoin-qt wallet has dropped the official support for bitcoin mining.
You should compile cpuminer from the source code to obtain optimal performance. Binary packages are not optimized for your system and therefore are often slower. To execute the cpuminer installation + compilation procedure on Ubuntu, follow this askUbuntu topic.
WARNING: don't use cpuminer or any miner software on remote hosted machines, it's considered as an abuse of common resources and can be treated as an attack to the hosted system.
NOTE: Bitcoin mining is very time consuming and you need a very powerful network of server machines to obtain even a small result (less than a bitcoin in most cases). This is due to the fact that you are competing with people and organizations running highly specialized hardware (ASIC miners, FPGA devices etc.) which does nothing but compute BTC block hashes 24h a day.
Please don't hesitate to ask by commenting here if you have more questions and don't forget to press the left UP arrow if I'm of any help.