##################################################
#
#  Net-Fu (version 0.91):
#   A WWW graphic-art generation system
#
#  Copyright 1997-1998 by:
#   Bryan Livingston      (bryan@cooltext.com) * Current Maintainer
#   Spencer Kimball       (spencer@xcf.berkeley.edu)
#   Peter Mattis          (petm@xcf.berkeley.edu)
#   Yaroslav Faybishenko  (yaroslav@xcf.berkeley.edu)
#
##################################################


This document contains directions for installing net-fu.


***  IMPORTANT--READ FIRST  ***

Review the following checklist of installation prerequisites and make
sure all items apply to you before proceeding:

1) Have gimp version 1.0.0 & gtk 1.0.4 source trees

2) The ability to compile gimp and gtk.

2) Have access to a WWW server capable of serving simple html pages
    as well as run cgi-bin programs

3) Have appropriate permissions to install cgi-bin programs.

4) Have freefont and sharefont packages installed

5) It is not required, but it is recommended that you be able to create
    a separate account through which all net-fu operations are handled

6) A program called wget installed.  It is freely available on the net.

7) Perl installed.  Tested and developed with Perl 5.

***  Installing  ***

Assuming you meet the criteria listed above, you can begin the
installation process.  This is not for the novice users.  We appreciate
input that is intended to improve the state of the software, but
discourage whining and demands for fixes.

This is a very, very rough guide to the installation process, and will
be updated as this software evolves.  All improvements are welcome.

*) Consider creating a new net-fu account to host the net-fu server
    so that a special gimprc file can be created

1) In order to prevent interactive debugging messages when GIMP
    experiences a segmentation fault, this step replaces the
    standard glib g_debug function with one which checks for the
    environment variable GLIB_NO_DEBUG before continuing.  Since
    interactive debugging will cause problems for gimp in batch
    mode, it is necessary to define the GLIB_NO_DEBUG variable in
    the supplied net-fu server-start script.

   To effect this change, copy the supplied gerror.c file to the
    your gtk distribution source tree and remake from the toplevel
    gtk directory

    cp <unpack_dir>/net-fu/gerror.c <gtk_dist>/glib
    cd <gtk_dist>
    make
    make install (as root)

   If you compiled GIMP with dynamic libraries turned on, nothing else
    needs to be done.  Otherwise, change to the gimp source directory
    and remake.

   Note that this hasn't been tested with the latest versions of gtk and
   might cause trouble in untested versions.

2) Unzip and untar the net-fu distribution

3) Edit the top of the proxy_form.cgi in the cgi-bin directory, change the
    $IP_ADDR to the IP address of the server that will run gimp.

4) Copy proxy_form.cgi from cgi-bin in the appropriate system cgi-bin
    directory on the http server.  Make sure the permissions are set to 755.

    chmod 755 <cgi_bin_dir>/proxy_form.cgi

5) Copy the contents of the html directory to the system html directory.
     Feel free to edit them however you'd like.  You may need to set up your
     web server to run programs with a .cgi extention as cgi scripts when they
     are in the html tree.

6) A temporary directory must be designated to store newly created images.
     This temporary directory is specified in the gimprc file as
     (temp-path), and make a symbolic link to it from
     <unpack_dir>/net-fu/html called "tmp".  Keep in mind that this tmp
     directory must be visible from both the gimp server and the http server.

     cd <unpack_dir>/net-fu/html
     ln -s <tmp_dir> ./tmp

     You will need to either place that directory in the ftp tree under /pub/tmp
     or remove the second link line (the "(Shift-)Click here to download") or else
     the second link will be dead.

7) Copy the contents of the scripts dir to the systems share/gimp/scripts dir.
     They have been renamed both in the file and function names so that they can
     co-exist peacefully in the same place as the normal scripts.

8) Run gimp to make sure a ~/.gimp directory is created with a gimprc file

9) Edit the following variables in the gimprc file:

     temp-path       ->  <tmp_dir>

10) Edit the script <unpack_dir>/net-fu/server-start to reflect the
     following:

     PS_CMD        ->  ps command for the system
     FONT_PATH     ->  The path to freefont and sharefont fonts
     GIMP_PATH     ->  The absolute path to the gimp executable
     SFU_PATH      ->  The absolute path to the script-fu executable
     LOG_PATH      ->  The absolute path to the script-fu log file
     OLD_LOG_PATH  ->  The absolute path to a directory for old logs
     ERR_PATH      ->  The absolute path to a gimp error file
     SF_PORT       ->  The port used for the script-fu process

11) If you are going to use the stats.pl program to generate realtime queue status
     that can be mounted on the web you will need to double check the path to the
     stats.pl in the server-start shell script.  You will also need to cusomize
     the paths to the html directory and the log files inside of the stats.pl file.

12) Install the contents of the included "crontab" file to the net-fu
     user's crontab with:

     crontab -e

    Make sure to replace <tmp_dir> with the directory you've already chosen
     for temporary files

    I have found that adding a line to run the server-restart script once an hour
    keeps things running a lot smoother.  Your mileage may very.

13) Run <unpack_dir>/net-fu/server-start to start the server.

14) From a WWW browser, attempt to connect to the httpd server and access
     the net-fu pages.

15) Test each available net-fu script option

16) Assuming all of the previous steps were completed, you're ready to roll.
