From owner-freebsd-questions@FreeBSD.ORG Wed Feb 27 19:54:15 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DCEBE950 for ; Wed, 27 Feb 2013 19:54:15 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com [IPv6:2607:f8b0:4003:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id A519DAAC for ; Wed, 27 Feb 2013 19:54:15 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id va7so183488obc.27 for ; Wed, 27 Feb 2013 11:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=bLUMITLwK7mEh8o9N7QxIBxi6bMNVxcfKRMBOFVb4uI=; b=x0AbYw3E1100CfWRDZlMKk6W6kZWH/MMB1ctQxPPXsj7LdJta1t7D6ropuVegNEbLT IosFRZrpmG6EoycHYvncmwUskmmzxpDvB5SxwNoCf4nXeK+Kx/tgLH0pd1QQD604grMF vWMvDChCiRaAVOGjse9Y2O7fGs2umQFp6cYPhXY3i+SlnEoa9llBBs9Cw4wiq9c3Yj2u 85DazDxtt8HiSGIkj8YxU3qIvk+CyAbel9Xctf4kfPHqdLR/ta07jblGpLrAuNfMhVK8 HI84Y8eRMbcWFcZCkcE2X5HurLDHONbl6ulf3ZRLppj+moFh2Yj1UiVW9wCv79/AGtuj 2MHg== MIME-Version: 1.0 X-Received: by 10.60.2.103 with SMTP id 7mr3416570oet.49.1361994854318; Wed, 27 Feb 2013 11:54:14 -0800 (PST) Received: by 10.76.174.67 with HTTP; Wed, 27 Feb 2013 11:54:14 -0800 (PST) In-Reply-To: References: Date: Wed, 27 Feb 2013 13:54:14 -0600 Message-ID: Subject: Re: connect to a network printer to be able to print From: Antonio Olivares To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 19:54:15 -0000 On Wed, Feb 27, 2013 at 12:47 PM, Warren Block wrote: > On Wed, 27 Feb 2013, Antonio Olivares wrote: > >> Dear folks, >> >> I am trying to connect a network printer to be able to print to it. I >> know the make/model of the printer: >> HP Color LaserJet CP4520 >> and the ip address it is on >> 10.155.135.3 >> >> I want to use lpd/lpr to be able to print as is specified in >> http://www.wonkity.com/~wblock/docs/html/lpdprinting.html >> >> I read the instructions on the handbook, but it does not specify how >> to use the ip address or specify it to print to it. How can I set >> this printer up? >> I have setup /etc/printcap with the following: >> >> lp:\ >> :lp=:\ >> :sh:\ >> :mx#0:\ >> :rm=HP_Color_LaserJet_CP4520:\ >> :rp=raw:\ >> :sd=/var/spool/lpd/lp:\ >> :lf=/var/log/lpd-errs: >> >> but there is no ip adress where the communication can exist. How can >> I do this? Do I setup the printer with CUPS? or can it be done with >> lpr which is what I use with a local HP 1200 printer, but this one is >> a network printer. > > > If your local DNS does not have a name for the printer, define it in > /etc/hosts: > > 10.155.135.3 HP_Color_LaserJet_CP4520 Dear Warren & all, I have succeeded ! I got it to work by using the last example in your page, copied it over to /etc/printcap: lp:\ :lp=9100@netlaser:\ :sh:\ :mx#0:\ :sd=/var/spool/lpd/lp:\ :lf=/var/log/lpd-errs: then ran # sed -i "" 's|9100@netlaser|9100@10.155.135.3|g' and it has printed successfully :) Now I will do this with two other machines to be able to print to this network printer. Thanks to all who helped figure this out. I had not even tried to connect, but reading on another site that it was not hard to do, I tried it and it has succeeded! Best Regards, Antonio