Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing via telnet

Posted on 1997-11-26
15
Medium Priority
?
521 Views
Last Modified: 2010-04-21
Is there a way to be able to print via Telnet?

I need to be able to print to a machine-attached printer from which I am telnetting to a remote host, running pine.  I do not have access to the config settings under pine, but I can print to a "terminal-attached printer" by default

Thanks

Vladislav
0
Comment
Question by:davidzon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
  • +3
15 Comments
 
LVL 1

Expert Comment

by:dhughes111797
ID: 2008045
did you already try 'Y' for print? (press O in pine and
you should see it)

It uses VT100 escape sequences to print. Of course, it will
only work if your using some sort of emulation that supports
passing the VT100 escape sequences back for printing..

0
 
LVL 1

Author Comment

by:davidzon
ID: 2008046
Yes, I've tried the Y to print.  It scrolls the message past my face and telnet does not pick up the print job.

Is there a version of telnet for BSDI (or source code that I can compile) out there that can be used so that when I print through pine (y to print) it will pass it on to the local LPD daemon?

0
 
LVL 1

Expert Comment

by:dhughes111797
ID: 2008047
You could take the source from NetBSD or FreeBSD and
compile it to support that. But you'll have to integrate
that in yourself. The telnet client doesn't support that
by default (sending to lpd). It'd probably be easier to
just rcp the file back and print it that way.. (or use
ssh and scp for a more secure way to do it)

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:davidzon
ID: 2008048
Hrmm... What clients are you aware of other than ssh that do this?  I would hate to have to install ssh client / daemon.


0
 
LVL 1

Expert Comment

by:dhughes111797
ID: 2008049
The only other way would be to write your own simple
client/server program to do it yourself. (in Perl for
instance - server running on your machine listens to
a connection on a port, receives file, and then prints
it using lpr)

0
 
LVL 1

Author Comment

by:davidzon
ID: 2008050
Anything server-based is not an option due to a possible security threat.  

I can not be the only one who has been faced with this problem!  Someone must have done this before...

0
 
LVL 1

Author Comment

by:davidzon
ID: 2008051
Anything server-based is not an option due to a possible security threat.  

I can not be the only one who has been faced with this problem!  Someone must have done this before...

0
 

Expert Comment

by:wjg
ID: 2008052
Two methods I can think of: 1) Run script(1) to capture the
output of your whole session and then some filter to extract
the stuff you want to print and 2) Try to solve this with
expect. Expect is available free on most TCL sites and can
probably be used to catch the vt100 printer escape sequence
for automagical redirection of the displayed printjob onto a
local printer (I haven't used expect for quite some time now -
no guarantee that this will work).
0
 
LVL 4

Expert Comment

by:jlms
ID: 2008053
Save the file in pine.
Copy it to your machine (ftp,rcp).
Print it.

If you are working in a UNIX machine (not a terminal) you should use the normal procedure for remote printing.

Please be more specific about how things are: type of machine and OS where you are could be a good start.

0
 

Expert Comment

by:grantk
ID: 2008054
Assuming the printer is attached to a system running lpd, just pipe the message to "lpr -Pprintername".

If the printer's on a Unix system, it should have lpd on it already, or you can download it. NT also has a LPD which comes with it.

So, what you'd need to do is:
1) set up lpr on the client
2) set up lpd on the server

For the client, you will need to create or change /etc/princap (as root, or the sysadmin must do it).

myprinter|aliasformyprinter|:\
:lp=:rm=remote.printer.ip.address.com:rp=raw:sd=/var/spool/lpd/myprinter:lf=/var/spool/lpd/myprinter-errs:

Then you can use "lpr -Pmyprinter" to print.


For the server, you'll need to read the docs with the program, but its usually pretty simple.


0
 
LVL 1

Accepted Solution

by:
tiago earned 400 total points
ID: 2008055
Your telnet must support printing to the current device (stdout).
Also, you must print using "attached-to-ansi" in Pine (in your case, the "terminal-attached" printer).

I know only one telnet that can do this, and it comes with the
Exceed package.
0
 
LVL 1

Author Comment

by:davidzon
ID: 2008056
If you can tell me where to get this package, I will give you a grade of A :>

thanks!

VSD

0
 
LVL 1

Expert Comment

by:tiago
ID: 2008057
0
 
LVL 1

Author Comment

by:davidzon
ID: 2008058
Excellent answer!

Thanks!

0
 
LVL 1

Author Comment

by:davidzon
ID: 2008059
Excellent answer!

Thanks!

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question