Solaris comes with an Xprint server, so rather than putting in a new one, the Xprint developers have created an Xprint "glue" which is just a set of configuration files and init scripts. If you are using Solaris 7 or greater you can use this package.
# gtar xfz GISWxprintglue-sparc-2004-03-22-release_009.tar.gz
Look at the readme. You will need to patch your system before you can use this package. The README file describes which patches you need and how to configure xprint. Install the package and start the server, then wait.
# pkgadd -d GISWxprintglue.pkg
# /etc/init.d/xprint start
Starting Xprint servers: Xprt.
# sleep 30
You can use the init script to query your printer listings:
# /etc/init.d/xprint lsprinters
printer: xp_ps_spooldir_tmp_Xprintjobs@saraswati:33
This tells me that it didn't find my epson printer, but it was configured with a default print to file spooler. I needed to edit the file /opt/GISWxprintglue/server/etc/XpConfig/C/print/Xprinters I added the following line, which is the name of my printer that I specified above:
Printer epson
Next, I created a custom printer by the following:
# cd /opt/GISWxprintglue/server/etc/XpConfig/C/print/models
# mkdir epson
# ln -s PSdefault/fonts epson
# cp PSdefault/model-config epson
Then I editted epson/model-config with the following changes:
*descriptor: Epson Stylus C84 (change)
*xp-spooler-command: /opt/csw/bin/lp (add)
*plexes-supported: simplex (change)
*printer-model: "Stylus C84" (change)
*printer-resolutions-supported: 300 600 720 940 1200 2440 (change)
*default-printer-resolution: 600 (add)
Finally, I editted /opt/GISWxprintglue/server/etc/XpConfig/C/print/attributes/printer and added the following line:
epson.xp-model-identifier: epson
The syntax for this line is PRINTER_NAME.xp-model-identifier: DIRECTORY_NAME where PRINTER_NAME would be the name you typed everywhere above and DIRECTORY_NAME is the name you typed in for the mkdir command one paragraph above. Keep them the same for simplicity. After restarting, sleeping and listing printers, I now see my printer:
# /etc/init.d/xprint restart ; sleep 30 ; /etc/init.d/xprint lsprinters
printer: xp_ps_spooldir_tmp_Xprintjobs@saraswati:33
printer: epson@saraswati:33
Now try a test page from a program that uses xprint. I used MozillaFirebird which had been compiled to only support Xprint servers. This forced me to learn about them.