Seeing several postings regarding local printing when connected via VNC, I've decided
to post the solution that I found for this situation.
In particular, this is for a Solaris VNC server session, sending a postscript printjob
to a local Windows printer which is running the VNC viewer.
NOTE: This solution is not dependent on VNC in any way, but is designed primarily to
work using a PPTP (VPN) connection. It can work thru a forwarded SSH connection as
well. IE. No SMB stuff required. Samba can be used if you don't want to use a
windows LPR/LPD client...but I found it not as stable or fast...and it complicates the
Solaris setup.
The setup is a little involved, but the results are worth it.
BJ.
PS: Don't ask me about forwarded SSH, PPTP, DHCP or firewall issues, because they are
beyond the intent of this posting.
Windows Setup
-------------
Redirection Port Monitor
Overview
The RedMon port monitor redirects a special printer port to a program.
RedMon is commonly used with Ghostscript and a non-PostScript printer
to emulate a PostScript printer.
You can obtain RedMon from:
ftp://ftp.cs.wisc.edu/ghost/ghostgum/redmon15.zip
_________________________________________________________________
Redmon Installation
Run setup.exe to install the RedMon redirection port monitor. The
files setup.exe, redmon95.dll, redmonnt.dll, redmon35.dll, redmon.hlp
and unredmon.exe must all be in the same directory.
_________________________________________________________________
Ghostscript Installation
You can get Aladdin Ghostscript 6.01 from:
http://www.cs.wisc.edu/~ghost
You should install Ghostscript using the setup program provided with it.
Use GSview to make sure that Ghostscript is running correctly before
trying to use RedMon.
_________________________________________________________________
Ghostscript / Redmon Setup
You can use Ghostscript with RedMon to create a PostScript printer.
Let's say you have an existing HP DeskJet 660C printer.
View the printer properties of the existing printer, select the Details
tab, then select the Add Port button. Select Other, Redirected Port
then OK.
The RedMon Add Port dialog will appear. Accept the default port name
of RPT1.
Do not change the port of the existing printer (should still be LPT1).
Cancel the printer dialog box.
Using the Add Printer wizard, create a new printer object for a
PostScript printer. A suitable one is HP LaserJet 4/4MP.
Open the printer properties of this new PostScript printer, select the
Details tab, then change the Print to the following port field to the
RedMon port you created, RPT1:
Select the Port Settings button. The RPT1 Properties dialog will
appear.
Enter the program name
c:\aladdin\gs6.01\bin\gswin32c.exe
and the arguments
-Ic:\aladdin\gs6.01\lib;c:\aladdin\fonts -sDEVICE=mswinpr2 -dNOPAUSE
-sOutputFile="//spool/HP DeskJet 660C" -
The "HP DeskJet 660C" above should be the exact name of the existing
print as shown in the "Printers" dialog box.
The DEVICE mswinpr2 uses the native windows print drivers for output,
so there is no need to specify what type of printer is actually
connected.
Make sure you include the space and dash at the end of the line.
Failure to do this could result in Ghostscript stalling the print
queue. Set output to Program handles output. Accept the dialog.
From the printer properties of this PostScript printer, select the
Details tab, then select the Spool Settings button. Change the Spool
data format to RAW. Select Disable bi-directional support for this
printer This last change is most important.
From the printer properties of this PostScript printer, select the
PostScript tab. Make sure that PostScript header is Download header
with each print job. Select the Advanced button to display the
Advanced PostScript Options. Data format should be ASCII data.
Deselect both Send CTRL+D before job and Send CTRL+D after job.
Printing to this HP LaserJet 4/4MP printer will now print using
Ghostscript. Try printing a test page.
_________________________________________________________________
NIPrint
Windows LPR/LPD Client
Download from ftp://ftp.netinst.com/pub/demos/nidemo.EXE. This is a 30-day
demo. I couldn't find a good and free LPR/LPD client.
From the Configuration menu, choose General Settings. On the Main
Properties tab, ENABLE LOCAL PRINT SERVER and on the Startup tab
"Start Minimized".
From the Configuration menu, choose Local print configuration. Then
click Add Printer. Select postscript printer (will be redirected to
actual printer), and enter a printer name (will be used to configure
printer under solaris).
Click Advanced Print Settings, then deselect "Allow to print
banner page".
Click OK, OK, then Save.
_________________________________________________________________
SOLARIS SETUP
Each connected user must have a static IP address, specified in the
/etc/hosts file or via DNS. If your connecting via PPTP (ala VPN) this is
easy...if its thru forwarded SSH, you may have to contend with DHCP issues
and allowing outgoing lp requests thru your firewall.
Create the remote printer as follows:
lpadmin -p printername -s systemname!printername
where systemname is resolvable to remote windows IP,
and printername is the name given in NIPrint configuration.
_________________________________________________________________
Now any postscript print job sent to printername, will be
spooled by NIPrint immediately and sent to the postscript printer.
The postscript printer will invoke REDMON and pass job to GS, and
final output will go to DeskJet printer.
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------