Before install driver, first close desktop manager:
sudo service lightdm stop
For install propretary nvidia driver, follow this step:
1) download driver from: http://www.nvidia.com (select correct gpu, operating system and architecture (32 o 64 bit))
2) required: linux headers (if not installed) and other stuff:
sudo apt-get install build-essential linux-headers-`uname -r`
3) ctrl+alt+F4 (or another tty) and login.
4) install driver.
sudo sh <script NVIDIA>
Installer will configure and build module for your kernel. If anything ok, you must be able to restart your desktop manager with nvidia driver. (nvidia installer write xorg.conf: check correct configuration.)
5) restart desktop manager:
sudo service lightdm start
check if module was mounted on kernel:
lsmod | grep nvidia
N.B. Possible issue:
gcc version are different between driver and installed copy of gcc
Read /var/log/Xorg.0.log for error, if xserver fail during startup.