cancel
Showing results for 
Search instead for 
Did you mean: 

Print from Putty

 
ivy1234
Frequent Advisor

Print from Putty

I use the program "Putty" to connect to database on unix server , the system will direct the printing output to lpt1 , but I found that no output can not be re-direct to lpt1 , I also can't find the setting about printing , can advise what can i do ? thx
8 REPLIES
Manix
Honored Contributor

Re: Print from Putty

some basic steps to try

1. Check for any ongoing print job:
#> /usr/bin/lpstat -u
#> /usr/bin/lpstat -o

Cancel print job if necessary:
#> /usr/bin/cancel


2. Stop the LP spooler:
#> /usr/sbin/lpshut


3Test the print queue as following:
#> lp -d /etc/hosts
#> lpstat -t

3. Restart the LP spooler:
#> /usr/sbin/lpsched

Thanks
Manix
HP-UX been always lovable - Mani Kalra
ivy1234
Frequent Advisor

Re: Print from Putty

the database will direct the output to /dev/tty ( default printer ) , but now it can't be print , can advise what can I do ? t hx
Hakki Aydin Ucar
Honored Contributor

Re: Print from Putty

Put in local ;

Start with script command to capture all works.
At the end stop capturing with command Ctrl+D
then ftp the typescript file to the local and print..
ivy1234
Frequent Advisor

Re: Print from Putty

thx reply ,

what I want is when print to /dev/tty , the output will go to default printer , can advise what can i do ? thx
Jose Mosquera
Honored Contributor

Re: Print from Putty

Hi,

Putty is an emulator installed in your wintel client, any print request from Putty will be done against a printer device under wintel control (lpt1, usb, lan).

By other way, Putty allows you connect work sesions with your unix box, these sesions allow you executes native commands of unix, one of them could be lp (unix printer command). Previously also you need defined into unix a printer queue to accept and manage printers request that will be printed by devices attached at unix environment (parallel ports, lan).

You must understand these differences when you requires done a printer request.

Rgds.
Jose Mosquera
Honored Contributor

Re: Print from Putty

Hi again,

Hard to explain by a post. Please go at "Printer" theme (page 64) inside of HP-UX System Administrator's Guide:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02281492/c02281492.pdf

rgds.
Bill Hassell
Honored Contributor

Re: Print from Putty

I think the question is about pass-through printing (ANSI print commands). What this means is that text on the screen or captured with logging will be sent to PuTTY but prepended with an escape sequence that triggers send-to-local-printer. This is off by default and the setting is on the first page of the Terminal configuration. You'll see a list of all the printers known to your PC.

Some programs have the ability to 'print' but really, the program is just inserting the start print characters followed by the text to print and terminated by a stop print character string. Here are some note from the PuTTY pages:

http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html

Look for Remote-controlled Printing.

The tricky part is that PuTTY sends 'raw' text, that is, whatever is written to the screen is sent as-is to the printer. Many, many cheap printers today cannot print simple text like "abc". Instead, it must be converted to a series of dots on the page, compatible with the dot-language used by the printer. Without proper formatting, the text is ignored or produces printer errors.

So your mileage may vary. If you have a daisy wheel or high-end laser printer that can format and print plain ASCII, this may work.


Bill Hassell, sysadmin
ivy1234
Frequent Advisor

Re: Print from Putty

Yes , You are right ,

Thanks for help .