RE: Printing to WTK from Linux over ssh tunnel
"Norman Laskie" <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.fourjs.user |
|---|---|
| Message-ID | <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAglNvcA1fnk+NYtsRBdwYSMKAAAAQAAAAA5XnExTksk++ZL7f8Z4ObAEAAAAA@esc6.net> |
You can also use "slave" printing to achieve the same functionality without having to worry about having to worry about some of the issues that may arise using rcp (like firewall issues). Slave printing sends the print data through the same telnet or ssh session that your program is being executed on. If you are using an HP printer you can send PCL codes to your printer to turn on certain features like printing in landscape, changing the number of lines per page, duplexing, and other advanced features. I have a couple scripts available if you would like to try it out. ----- Norman -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of McGrath, Colin Sent: Tuesday, February 08, 2005 3:01 PM To: [email protected] Subject: RE: [fourjs-users] Printing to WTK from Linux over ssh tunnel I've taken a page from Four-J's User Guide, and made a shell script that is called up when the user logs in with ssh. :::setFGLSERVER::: #!/usr/bin/ksh # setFGLSERVER CMcG 03/19/01 (4JS example) # FGLSERVER passed from @FGL when VPN is used is wrong. Get it from "who -m" export FGLSERVER=`who -m | cut -d'(' -f2 | cut -d')' -f1`:0 You can add a call to "setFGLSERVER" in the WTK target field, or if they use PuTTY or something, add the call to their .profile Note: Big files can overwhelm the printer port, you can lose data, you might try a Window's lpd service, like the freeware from http://www.kabelmax.de/winsoft.html You can send the file to the lpd-win print spooler from the UNIX box with rlpr -- Colin -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Joe Lewinski Sent: Tuesday, February 08, 2005 3:24 PM To: [email protected] Subject: [fourjs-users] Printing to WTK from Linux over ssh tunnel Hello, We are using 3.10.1i and traditionally have been able to perform a remote copy to the local PCs printer port from Linux as in: rcp file pc_ip_address:LPT1 and a file would print on the local PCs parallel port. Now that we are using a ssh tunnel started by the following DOS bat file: @echo off rem Login to server and setup a tunnel cd c:\fourjs\3_53_1a C:\fourjs\3_53_1a\bin\startwtk.exe -w; cd c:\etc ssh -l some_user -C -R 6405:localhost:6405 66.202.6.91 "/bin/ksh -c '/app/bin/sshgui.sh 5'" We get our GUI running, but cannot get the printing to work. When the sshgui.sh program runs (above), the FGLSERVER variable is set to "localhost:5". When we attempt to run an rcp from either a sub-shell of the users login shell, or from a separate process group, we cannot connect to the Windows 2000 PC client. Any help or suggestions are appreciated. Thanks! Joe Joe Lewinski ICANON Associates, Inc. Phone: 215.822.5519 Fax: 215.822.5523 NEWZware is a product of ICANON Inc. - Visit our web site at http://www.icanon.com/ for more information on ICANON, the company, and its suite of products and services.