A guide for installing NVIDIA drivers for most Linux distros.



Part I -- Preparation
You should have the following packages installed before running the .run installer:

Terminal line to run as root in...
Fedora: yum install gcc binutils pkgconfig kernel-devel kernel-headers
SuSE: yast2 -i gcc binutils pkgconfig xorg-x11-sdk kernel-source
Ubuntu: apt-get install nvidia-glx nvidia-settings linux-restricted-modules-`uname -r`
Debian: Visit this website: http://wiki.debian.org/NvidiaGraphicsDrivers for info on installing the drivers in Debian.
Other distros not mentioned here: Please locate the packages which match the list above. This should be pretty easy to do. This guide will be updated to better-suite those needs but for now search your package manager for them.

Once you have these installed you need to stop X from running.

Open a command prompt (ctrl+alt+f1), log in as root and type telinit 3 to switch to runlevel 3. Make sure X is dead (ctrl+alt+f7).

Part II -- Installing the Driver
You are now ready to actually install the drivers. To do this, open the command prompt (this should already be open a second ago) and navigate to where you saved the .run file from nvidia.com. Example: cd /home/myusername/Desktop. To run the file simply type sh NVIDIA- then hit tab to auto-complete the filename. The installer will start.

First, it will ask you to accept the EULA (End-User Lisence Aggreement).
Second, it will ask to check for pre-compiled kernel modules for your distro. Note: you must be connected to the internet for this to work. Even with an internet connection I have yet to see it retrieve anything.
Third, if none can be found, it will say it needs to build it's own module. Press enter on "OK" to begin.
It will check through your system for the utilities it uses to install which are in the list at the top of this HowTO (:
If no errors are reported you may begin the module compile by hitting ok.
After the installer completes, it will ask if you would like the installer to auto-configure your xorg.conf file. For Fedora Core this works fine. I havn't tried for any others but it should be the same. In short: I reccommend you do.
After the install exits, reboot by typing reboot into the command prompt.

Part III -- Testing
Log-in and open a terminal. There are 2 utilites to check for GLX 3D Rendering (Direct Rendering), glxinfo and glxgears. Run each of these in the terminal.
glxinfo: In a typical size terminal you will have to scroll up to see the line direct rendering:. It should look like this: direct rendering: yes. If it says yes, run glxgears.
glxgears: After running the command a window should pop up with gears spinning while it spams your terminal with frames per second readouts. Depending on the hardware the rate will vary but even with lower-grade hardware this will be greater than ~100. My 9600XT got ~4,000.

If these did not work then the problem is likely one of these:

Part IV -- Questions? and 3D Desktop HowTo
Hopefully your games/apps run well. If you have any questions, well, theres google which is where I learned all of this. There is also #linux on irc.EFnet.net, but please google first :)

For information on AIGLX, Xgl, Beryl and Compiz, see: http://forums.fedoraforum.org/showthread.php?t=121119
or the example xorg.conf below.


Credits:
This guide was written by downhillgames @ #Fedora on Freenode IRC (irc.freenode.net) on Nov 20, 2006.
Submit corrections (spelling and technical) to downhillgames @T gmail D.T com
Credit for submitted fixes will go here, also.

Updates:
*Pretty much re-wrote the HowTo (June 10, 2007)
*Example conf
*Updated the Debian URL

Your xorg.conf file should look something like this, with the exception of the keyboard/mouse parts. I use Fedora 7 and AIGLX with an nVidia video card as well. For more specific information regarding 3D desktops, view the thread above^
#############################START###########################

Section "ServerLayout"
    Identifier "single monitor"
    Screen 0    "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
EndSection

Section "Device"
        Identifier     "Videocard0"
        Driver         "nvidia"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
    DefaultDepth    24
    SubSection     "Display"
        Viewport    0 0
        Depth     24
    EndSubSection
EndSection

#############################END#############################

ATi users add the following to xorg.conf at the very bottom in it's own section:

Section "DRI"
        Group        0
        Mode         0666
EndSection