Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!chinacat!sequoia!helps!jhoward From: jhoward@helps.cactus.org (James Howard) Newsgroups: comp.dcom.modems Subject: Re: Attached printers over modems Message-ID: <1145@helps.cactus.org> Date: 29 May 91 14:40:58 GMT References: <9u5g34w164w@cccbbs.UUCP> Organization: Howard Electronic Laboratories Products & Services, Austin, TX Lines: 88 In article <9u5g34w164w@cccbbs.UUCP> dpavey@cccbbs.UUCP (doug pavey) writes: >Does anyone have an idea of how one might be able to setup a printer >on a unix system such that a remote user, calling in over a modem can >print on his local printer? >... Here is the shell script used here. We only have VT100 terminals calling. You could use if statements based on the "$TERM" to select the correct strings to use the local printer. Also following is an old artical on the same subject. ----------cut----------cut----------cut----------cut----------cut---------- : echo "\033[5i\c" if [ $# -ge 1 ] then files="$*" for file in $files do cat "$file" 2>&1 echo "\014\c" done else cat - echo "\014\c" fi echo "\033[4i\c" sleep 1 exit 0 # # Clarence A Dold - dold@tsmiti.Convergent.COM (408) 434-5293 # ...pyramid!ctnews!tsmiti!dold # P.O.Box 6685, San Jose, CA 95150-6685 MS#10-007 # # Article 1588 of comp.unix.xenix: # From: dold@mitisft.Convergent.COM (Clarence Dold) # Newsgroups: comp.unix.xenix # Subject: Re: LOCAL PRINTING (LPRINT) UNDER XENIX - NEED HELP! # Message-ID: <699@mitisft.Convergent.COM> # Date: 19 May 89 16:11:46 GMT # References: <133@tdl.UUCP> # Organization: Convergent Technologies, San Jose, CA # Lines: 68 # # in article <133@tdl.UUCP>, raulin@tdl.UUCP (Raulin Olivera) says: # # > In article <2446@rencon.UUCP>, gary@rencon.UUCP (Gary Falsken) writes: # >> I have 5 modem lines coming into my 386 system with users calling in from # >> other locations using MS-DOS based equipment and Procomm Plus as the # >> terminal emulator. These users want to be able to print files out on their # >> local printers. SCO says I should use a program called lprint. I looked # # > do the same thing. Lprint didn't tell me much. I imagine that you # > can write your own interface script to send whatever codes necessary # > to get remote printing to work. The problem as I see it is that any # > codes sent will be intercepted by Procomm while in terminal mode. I # # The codes that cause a vt100 terminal to turn on printing to a second # serial port are recognized both by MS-DOS Kermit and ProComm. In both # cases, it causes print to go to PRN:, which is normally a parallel printer. # # You can either have someone use 'local' instead of 'lp' as their print # program: ( local /etc/passwd ), or you can install an lp printer # using an interface that sends the same codes, and -v set to each of # the available ports. # The 'lp' method is pretty ugly but it works. /etc/profile could then set # LPDEST to some printer name, based on the terminal line in use. # You can't use '/dev/tty', since the lp spooler has no attached tty. # This method is really only for programs hard-coded to drive lp. # Any configurable program should be set up to use 'local', or whatever # you might call it. # # If you are using some smart XENIX serial port board, there are ways # to do simultaneous print, this shell script freezes the terminal until # printing is done. # # For a terminal or emulator understands ansi local print controls. # see pg 29 of TERMINFO(4) in CTIX Version C manual for detail. # Media copy strings for ansi: # mc5i - echo "\033[5i\c" - print without displaying to screen # mc4 - echo "\033[4\c" - turn off local print # presumably 'tput mc5i' would work in place of the echo strings below. ___ James Howard Howard Electronic Laboratories Products & Services AA5R cs.utexas.edu!helps!jhoward or jhoward@helps.cactus.org