For many distributions, for example Debian, Suse, and Gentoo, nvtv is
now available as a package. (I would appreciate it if the package
maintainers would drop me an email when they package nvtv, so I can
update the documentation.)

There is a basic configure script, however, it has not been tested on
many systems yet.


BASIC INSTALLATION
------------------

Type "./configure", then "cd src", and then "make". Copy the
executables "nvtv" and "nvtvd" to your favorite bin directory. See
USAGE about how to run the program. 

You can optionally make a program "nvdump" by typing "make
nvdump". This program dumps parts of the NVidia register space and can
be used for troubleshooting. It is normally not required.

If anything goes wrong, first try to figure out if a library is
missing. The configure script should stop in this case with a
message like "library xyz required" or "header 'xyz' required".
These libraries and their header files should then be installed 
in a place where they can be found by the compiler.

Libraries needed are libpci, libXmu, libXxf86vm and gtk (1.2 or 2.0)

The pciutils library is not installed by default on many systems,
though it is available for most of them as a package. If not, you
can download it from

http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml


CONFIGURE OPTIONS
-----------------

Additional configure options are 

--enable-debug [default]
--disable-debug

  Add debugging information (-g), or optimize instead (-O2).

--with-gtk [default]
--with-gtk=gtk1
--with-gtk=gtk2
--without-gtk

  Allows you to choose the GTK version (1.2 vs. 2.0), or to build 
  completely without the GTK graphical user interface. In that
  case, you are restricted to command line invocation. If GTK cannot be
  found on your system, the build is automatically restricted; so if
  you can only use the command line, that is the probable reason.
  If no options are given, configure checks first for GTK 1.2, and then
  for GTK 2.0 (because some parts of the GUI still have wrong sizes
  under GTK 2.0).

--with-fifo-path=[PATH]

  The path for the two named pipes (fifos) that the server and the client 
  use to communicate with each other. Default is /var/run. If this 
  directory is not available on your system, use another one, for 
  example /tmp. Make sure that the directory really exists, and has correct
  permissions.


DEBIAN
------

On Debian, you need the packages pciutils-dev, xlibs, xlibs-dev,
libgtk1.2 and libgtk1.2-dev or libgtk2.0 and libgtk2.0-dev.

SUSE 7.1
--------

For installing Nvtv on Suse 7.1 you need to get the pciutils (see above)

After installing pciutils you'll have to copy some files from the 
pciutils-xyz/lib directory manually (as root) to /usr:

cd pciutils-xys/lib
mkdir /usr/include/pci
cp *.h /usr/include/pci
cp libpci.a /usr/lib

Then do:
ldconfig

Now you are ready to run Nvtv's configure-script. Be sure you have the 
other needed packages installed! (See above)

SUSE 7.2
--------

The SuSE 7.2 series zq has now the source package pciutils_spm (v2.1.8).
Installing it with YaST copies the sources and diffs into the directory
/usr/src/packages/SOURCES. Use 'bzip2 -d pciutils-2.1.8.tar.bz2' to extract
the files into pciutils-2.1.8/lib. After a 'cd' into this directory
and './configure' followed by './make', follow the procedure above
for SuSE 7.1 including the final 'ldconfig' to install the package
properly.

After this, nvtv compiles without any problems.

MANDRAKE
--------

Nvtv works fine under Linux Mandrake 8.1 without doing any
pre-installation copy. Use the rpmdrake (mandrake's rpm installing
utility) or KPackage to install pciutil-devel. This is enough to
compile it. The X libraries are already installed if you selected the
'developer' profile while configuring mandrake.

SLACKWARE
---------

Here is a way to install pciutils for Slackware (7.1).

Used the source file provided from:
http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml

I chose to install it to:
/opt/libpci
but you can install it to wherever you want to.
Did not care about the man-files or the binaries.
Make some temporary directory, and cd into it.

tar -xzf pciutils-2.1.9.tar.gz
cd pciutils-2.1.9
make
cd lib
install -d /opt/libpci/include/pci
cp *.h /opt/libpci/include/pci
install -d /opt/libpci/lib
cp *.a /opt/libpci/lib

export C_INCLUDE_PATH=/opt/libpci/include
export LIBRARY_PATH=/opt/libpci/lib

After you set the include-path and library-path you do your ./configure 
for nvtv, and compile.

If you want, you can also install the pciutils binaries:

install -d /opt/libpci/sbin
cd ..
cp setpci /opt/libpci/sbin
cp lspci /opt/libpci/sbin


GENTOO LINUX
------------

Do the following to install nvtvd (apperently it is prepacked):

emerge nvtv
rc-update add nvtv default


OTHER LINUX DISTRIBUTIONS
-------------------------

If you have a different linux distribution (Red Hat, ...) please
drop me a mail at <dthierbach@gmx.de> and explain how to find the
packages above in your distribution, so I can include this information
in the documentation. (No, I cannot answer questions how to install
this program on distributions other than Debian).


FreeBSD
-------

There are reports that it is possible to use nvtv under FreeBSD by
putting the gtk libraries and piclib into the 'compatible' directory.
I don't have any concret step by step recipe; feel free to write one
and send it to me.


WINDOWS/CYGWIN
--------------

It is now possible to compile nvtv under Windows, with help of Cygwin.
Calling configure sets up everything the right way. However, the GUI
will be disabled, and switching back to the monitor mode will only
work with the fallback VESA modes ('nvtv -m -s 800x600@56' or similar,
see USAGE). Switching to the previously used mode does not work
because the available monitor modes cannot yet be accessed without
X. So usability is a bit limited (but fetching and printing the
current TV mode works).

Also, you will need the NVidia video driver.

In theory it would be possible to compile the GTK sources and then run
nvtv with a GUI inside the X provided by Cygwin, but I haven't tried
this.

THE 'SIMPLE' LIBRARY
--------------------

There is now a 'simple' library that allows other programs (e.g. totem)
to use nvtv. It can be found in the lib/ subdirectory, and must be
configured and compiled seperately.

