After a google search on how to shut down x server I found a couple of guides but none of them worked.
I tried Ctrl + Alt+F2, Ctrl+Alt+Backspace (only log you out from current session) and restarting in recovery mode and install from ther but when running the nvidia installer i got a error message. init level to low or somthing like that. but finally i found a way to shut down X server and install Nvidia drivers
Okay but anyways here it is from scratch!
Installing Official Nvidia drivers from nvidia.com on Ubuntu 9.04 and possibly 9.10 and other Linux distros as well:
1.First of all you can start by saving and shutting down everything you are doing then you can go to www.nvidia.com and download the appropriate driver for your GPU (I placed it on my desktop).
2.wait until the file has finished downloading (NVIDIA-Linux-x86_64-190.42-pkg2.run was the name of they file i had to download yours might be a different name) and then Right click the .run file select properties, go to the permissions tab and select allow excecuting file as a program then close the properties menu.
3. Please finish reading this guide before you do this step
Now you have to shut down X server or else the drivers won’t install. You won’t have a graphical user interface after shutting down x. First of all you have to press Ctrl+Alt+F2 which will bring you into terminal only(no gui) if it ask for login a you have to input your username first and the your password. After you are logged in you can start inputting command. If you are running gnome you have to type in:
Sudo /etc/init.d/gdm stop
This will stop Gnome desktop.
If you are running Kde you have to type in:
Sudo /etc/init.d/gdm stop
This will stop Kde desktop
4. Now you have to find the place you saved the Nvidia installer. Type cd /home/[username]/Desktop (only If you saved the file on your desktop) and press enter. Now you want to know the name of the nvidia installer you downladed. type in: dir to se what files there are inside the folder. I had only one file in the folder NVIDIA-Linux-x86_64-190.42-pkg2.run which is the one i want se the name of maybe you have a different name on the file. Then type in ./[name of your file].run and the installer should start and you can follow the instructions.
5. When installer has finished you will have to type in Sudo /etc/init.d/gdm start for gnome or Sudo /etc/init.d/Kde start if you are running Kde. This should bring you back to the login screen and the drivers have been successfully installed.
Congrats