LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-05-2004, 03:29 PM   #1
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Rep: Reputation: 30
printing during a telnet session in freebsd


Ok so if i use
lptest > /dev/lpt0
I can print
but what I need to do is be able to print from withint a telnet session to another machine? normally people press ctrl + shift + . to send a page to the printer but when I do that I only get a . echoed onto the thscreen. any ideas? I am telneting to an HP-UX 11 Machine running the dynix software(A library database) It uses universe I think.
 
Old 08-05-2004, 08:38 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
lpr -Pprinter_name file.to.print

Note, the remote printer must be in /etc/printcap on the system you are logged into. For example, I had this in /etc/printcap on one of my machines. This was setup by ApsFilter but you can do something similar by hand.

Code:
aps1|ijs/DESKJET_660;r=300x300;q=medium;c=full;p=letter;m=auto:\
    :lp=:\
    :rm=172.23.23.23:\
    :rp=lp:\
    :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/aps1:\
    :lf=/var/spool/lpd/aps1/log:\
    :af=/var/spool/lpd/aps1/acct:\
    :mx#0:\
    :sh:
On that system I would just type:
Code:
lpr -Paps1 memo.pdf
and the file memo.pdf would print at the computer with ip address 172.23.23.23 -- you have to be in /etc/hosts.lpd on the system with the printer to do this. You can also set the PRINTER shell variable so you don't have to type the printer name... it will automatically assume the remote printer.

That is just a basis to get you started. Without knowing specifically how the system is setup I can't help you too much. My advice (if you don't administer the system) is to take a peek in /etc/printcap and see if they define any remote printers.
 
Old 08-06-2004, 08:05 AM   #3
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Original Poster
Rep: Reputation: 30
The printer is a dot matrix parralell printer physically on the computer. So what I have is like this.

DotMatrix Printer<---LPTCABLE---->ComputerRunningBSD<--Telnet session--> to HPUX server

So I turn the computer on, login and type telnet XXX.XXX.XXX.XXX then login and now I can't print.
 
Old 08-06-2004, 10:48 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
http://www.freebsd.org/cgi/man.cgi?q...th=HP-UX+11.22
http://www.freebsd.org/cgi/man.cgi?q...22&format=html

And you are going to want to read the freebsd man pages for setting up the actual printer.
http://www.freebsd.org/cgi/man.cgi?q...SE&format=html
http://www.freebsd.org/cgi/man.cgi?q...+5.2.1-RELEASE

The reason you can't just print is because you are no longer "part" of the FreeBSD system when you are telnetted into the HPUX system. You have to specify where to send the document and the FreeBSD machine must be setup to receive it.
 
Old 08-06-2004, 11:38 AM   #5
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Original Poster
Rep: Reputation: 30
The account that I am logging into the HP-UX machine was one that printing was already working. If I log in via a windows machine with that account it can print to a local printer, also if I log in via a dumb terminal it can print to a local printer as well. Is this because BSD seems to label the device aas lpt0 and not lpt1?
 
Old 08-06-2004, 11:55 AM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Nah, that shouldn't be a problem... check what the device is called that you print to (should be in your PRINTER variable or in /etc/printcap on the hpux machine). Make sure you have a similar printer setup on the BSD box... and lpd accepts request... and the ip of the hpux server is in /etc/hosts.lpd
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
printing during a telnet session in gtelnet. jedimastermopar Linux - General 0 08-12-2004 09:40 AM
Telnet session issue wsleong Programming 0 07-22-2003 08:24 PM
See a telnet session log Linux - Newbie 5 01-13-2003 08:11 AM
Telnet session limit.. killjoy Linux - Networking 1 03-22-2001 01:57 PM
Automatic telnet session kobilevi Programming 2 03-18-2001 04:20 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration