I gathered tons of info here and there, and finally came up with an algorithm that worked.
Thanks to everybody who contributed in the previous posts and this forum a while back. I got some stuff from their posts too. Sorry I forgot their names.
This is what I did.
CUPS linux print server (redhat 9.0, kernel 2.4.22)
scenario: local USB printer attached to a linux workstation.
objective: windows xp print to it.
Both machines are on the same LAN. But it works ok if you are at home with a simple switch-hub or crossover cable.
1). Get the package cups package. Rpm or source. www.cups.org
--if you ask me, rpms are not really my choice.
2.) Install the cups package by doing:
# ./configure; make; make install.
3.) Restart service. You should see cups start with output "Cups scheduler started". /sbin/service cups start | stop
3.) Go to Linuxprinting.org. On the left side navigation bar, select The Database-> Printer Listings. Select your make/model printer, then click on the Show button. The next page will give you the option to generate a ppd file for your printer. Click on download PPD and save the file to /usr/share/cups/model. The file should be in a model.ppd format, if not, then rename it to my_printer.ppd.
4.) Restart cups by doing
/sbin/service cups restart.
5.) http://www.linuxprinting.org/download/foomatic/ and download the latest foomatic-filters.tar.gz (version 3.0 as of this writing). Then do the following:
# tar -xzf foomatic-filters-3.0.0.tar.gz
# ./configure
# make
# cp foomatic-rip /usr/lib/cups/filter/
6) in Red Hat, I went to #printconf-gui, click on Action, then Sharing...Selected what I wanted. Allow all, or specific IP.
****OR***
Open your favorite browser and point it to http://localhost:631
Under Administrative Tasks, add your printer. Just follow the directions.
7.) modify /etc/cups/cupsd.conf
<Location /printers/deskjet940c>
#Order Allow,Deny //comment added
#Deny From All //comment added
Allow From 127.0.0.1
Allow From 192.168.0.* //added this line
#AuthType None //comment added
Allow from All
</Location>
<Location />
#Order Deny,Allow //comment added
#Deny From All //comment added
Allow From 127.0.0.1
Allow From 192.168.0.* //added this line
</Location>
Browsing On
BrowseProtocols cups
#BrowseOrder Deny,Allow //comment added
BrowseAllow from @LOCAL
#BrowseAddress 192.168.0.255 //comment added
9)Modify smb.conf
ensure the following is set:
printing = cups
printcap name = cups
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
printing = cups
public = yes
printer name = deskjet940c
10.modfiy the following cups files:
/etc/cups/mime.convs
-uncomment the line:
application/octet-stream application/vnd.cups-raw
/etc/cups/mime.types
-uncomment the line:
application/octet-stream
11. /sbin/service cups stop | start
12/ sbin/service smb stop | start
Connection from Windows XP.
Go to add printer wizard, connect to:\\<ip linux server\deskjet940c, add drivers, and enjoy. Try http://<ip>/printers/deskjet940c but that requires you have ipp on windows.
Both ways worked just fine for me.