This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open Desktop or Openserver.

There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.

Printing FAQ

How do I do Transparent or pass-through printing (slave printing)?

Many terminals, and just about all terminal emulators, have the ability to do "local" printing. It's sometimes called "transparent printing" or "pass-through", but the idea is that if the terminal sees a special key sequence, it will start sending the data out some other port (parallel or serial) until it sees some sequence that tells it to stop.


Hate these ads?

In general terms, it's a lousy way to print. If you can possibly do this any other way, you'll be much better off.

If you have an intelligent multiport card serving these terminals, the vendor may have provided a way to make this better (still not great, but definitely much better). Digiboard, for example, creates transparent print devices that match your tty id's- if you have terminals /dev/ttyb01 through /dev/ttyb16, you also have /dev/prb01 through /dev/prb16, and as long as you have told the Digiboard driver what escape sequence will start and stop the printing (common terminal types like ansi and wyse60 are configurable by name), the driver will do a nice job of handling this for you: anything directed at those "pr" ports will get printed.

If you don't have something like this, you use commands like "lprint" (SCO OSR5) or you wrap your data in the start-stop sequences yourself. You can find the start-stop sequences in /etc/termcap: PN is the sequence to start local print; PS is the sequence to stop. For example, if you look at the vt100 entry, you'll see:



:PN=\E[5i:PS=\E[4i:\


That means that to start local printing on a vt100 terminal (or any ansi emulator) you'd echo an ESCAPE (ascii 27) followed by the characters "[5i". You'd then send the stuff to be printed, and stop with ESCAPE-[4i. You could also use "tput prtr_on" and "tput prtr_off" to send the codes if they are defined in terminfo.

But again, before you do this, consider your other choices: if this is a printer on a Windows network, both Visionf and Samba can treat that as a Unix printer. Or, there are Windows LPD programs that allow Windows to be treated as an LPD server ( see /Reviews/alphacom3.html for one).






If this is Windows with an emulator, the emulation software will either use the "default" Windows printer or will let you specify which printer to use. You may not be able to use the so-called "Windows" printers - the ultra-cheap things that are so common nowadays but that require tremendous support from drivers.

If it is a real terminal, the auxiliary printer port may be serial or parallell. If it just says "AUX", it's serial.

Debug this stuff by putting the appropriate codes into a file you can "cat". Put in the start code, some text, and the stop code. You can use Vi for this: to enter characters like ESC, hit CTRL-V first. So, to enter ESC [ 4 i in vi, you would type:



i (enter insert mode)
Ctrl-V  (want to enter control character)
ESCAPE  
[
4
i
ENTER
ESC (end insert mode)


Your whole session might be (keys shown on separate lines for clarity; don't press ENTER unless shown)



vi mytest
i
CTRL-V 
ESCAPE 



ENTER
This will be printed
ENTER
CTRL-V
ESCAPE
[
4
i
ESCAPE
:
w

ENTER





Cat that file, and you should print the text. If it prints on the screen, the start codes are wrong. If it never stops going to the printer, the stop codes are the problem. If nothing at all happens, the codes are probably right but something is wrong at the printer interface.

You may also have problems with flow control or the amount of data sent. Some of the products like Digi allow you to control how much print data is sent in each burst.

cartoon
Need eyes on the ground at your customer's site?
Installation and light training Boston and New England
Reliable and experienced, punctual and professional.

See also http://www.anzio.com/support/whitepapers/printguide.htm and Terminals




Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
2581682,587 6,638

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Modems/Terminals
       - FAQ




Unix/Linux Consultants

Your ad here - $48.00 yearly!

http://www.m3ipinc.com Security, firewalls, ids, audits, vulnerability assesments, BS7799, HIPAA, GLB, incident handling


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282



Twitter
  • Nov 21 07:55
    @loudmouthman: correct, but how do you prove ANYTHING like that is accurate? You can't. A text file is no better or worse than anything.
  • Nov 21 07:40
    @loudmouthman: well, a digital signature could prove it hadn't been altered. Text is no more insecure than anything else in that sense.









Change Congress


Related Posts