FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-12-2008, 05:26 PM
"Mark Knecht"
 
Default Detecting printers at a remote site

Hi,
My 80 year old dad has been running Gentoo for 6 years now and done
fine. I administer the machine remotely as he lives 400 miles away.
Cups is up and running fine on his machine.

Now my mom is switching over to Gentoo and I've added & started
cups on her computer. I've added a client.conf file pointing at my
dad's machine. I'm now trying to figure out if I've configured cupsd
correctly on my dad's machine to allow my mom's machine to see it.

What commands can I run from the command line to see whether a
printer is available? My parents are not terribly computer literate
(who is in their 80's) so I need to ensure this is really working
before I tell them to use it.

Also, if a client points itself at a cups server and finds a
printer there, does the client need to install the printer 'locally'
telling its own cups that the printer is out there or does the printer
just start showing up in applications and cups running on both
machines takes care of the printe formatting issues? Essentially, how
much does Open Office on the client need to know about the printer on
the server?

Thanks,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-13-2008, 03:53 AM
Joseph
 
Default Detecting printers at a remote site

It is hard to pin point the problem as you did not even post cupsd.conf;
however, here is a good article:

http://articles.techrepublic.com.com/5100-10878_11-5055067.html

I even printed myself a hard copy; go through it.

--
#Joseph
GPG KeyID: ED0E1FB7

On 06/12/08 10:26, Mark Knecht wrote:

Hi,
My 80 year old dad has been running Gentoo for 6 years now and done
fine. I administer the machine remotely as he lives 400 miles away.
Cups is up and running fine on his machine.

Now my mom is switching over to Gentoo and I've added & started
cups on her computer. I've added a client.conf file pointing at my
dad's machine. I'm now trying to figure out if I've configured cupsd
correctly on my dad's machine to allow my mom's machine to see it.

What commands can I run from the command line to see whether a
printer is available? My parents are not terribly computer literate
(who is in their 80's) so I need to ensure this is really working
before I tell them to use it.

Also, if a client points itself at a cups server and finds a
printer there, does the client need to install the printer 'locally'
telling its own cups that the printer is out there or does the printer
just start showing up in applications and cups running on both
machines takes care of the printe formatting issues? Essentially, how
much does Open Office on the client need to know about the printer on
the server?

Thanks,
Mark

--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-15-2008, 05:02 PM
Mick
 
Default Detecting printers at a remote site

On Friday 13 June 2008, Joseph wrote:

<top-post galore...>

> On 06/12/08 10:26, Mark Knecht wrote:

> > Now my mom is switching over to Gentoo and I've added & started
> >cups on her computer. I've added a client.conf file pointing at my
> >dad's machine. I'm now trying to figure out if I've configured cupsd
> >correctly on my dad's machine to allow my mom's machine to see it.

Check first that you allow connections on port 631 at your dad's firewall from
your mom's IP/MAC address (nmap or nc your dad's address from your mom's
machine), e.g.:

$ nc -vv -n -z 10.10.10.4 631
(UNKNOWN) [10.10.10.4] 631 (ipp) open
sent 0, rcvd 0

> > What commands can I run from the command line to see whether a
> >printer is available? My parents are not terribly computer literate
> >(who is in their 80's) so I need to ensure this is really working
> >before I tell them to use it.

$ lpstat -a

will show you any printers that have been configured on your mom's machine.

$ lpstat -p

will show what printers are available and their current status.

$ lpstat -s

will show their path/destination - this is good to check if you have
configured a printer's protocol:address correctly and it also shows you the
default printer; e.g.:
$ lpstat -s
system default destination: PS121
device for Compaq-HP: ipp://192.168.0.3/printers/Compaq-HP
device for DeskJet-930C: parallel:/dev/lp0
device for HP_LaserJet_4000: socket://10.81.104.202:9100
device for LaserJet4700dn: ipp://10.81.104.210/ipp/port1
device for PS121: lpd://10.10.10.4/DESKJET/port1

$ lpstat -t

will show you all of the above and more.

Use lp to print a text file as a test to the default printer (which you should
set up using lp:

$ lp test_file.txt or lpr test_file.txt

# cancel -a

will clear all queues of print jobs should things go wrong. Use # lpadmin -d
to set the default printer on your mums machine.

> > Also, if a client points itself at a cups server and finds a
> >printer there, does the client need to install the printer 'locally'
> >telling its own cups that the printer is out there or does the printer
> >just start showing up in applications and cups running on both
> >machines takes care of the printe formatting issues? Essentially, how
> >much does Open Office on the client need to know about the printer on
> >the server?

If I got right what you're saying here, then OOo only needs to know which
printer you have set up as the default printer on your mom's machine. Cups
on your mom's machine will submit to your dad's server, which in turn should
accept the job and send it to the physical printer. So, your dad's cups
points to the physical printer. Your mom's cups points to your dad's IP
address and physical printer name:

ipp://<dad's_LAN_IP_address>/printers/<physical_printer_name[1]>

[1] As set up in your dad's cups.

When you connect to your mom's machine open a second terminal and keep an eye
on the cups log file(s):

# tail -F /var/log/cups/error_log

HTH.
--
Regards,
Mick
 
Old 06-15-2008, 07:38 PM
"Mark Knecht"
 
Default Detecting printers at a remote site

Mick,
Thanks for the great write up. I really appreciate it.

On Sun, Jun 15, 2008 at 10:02 AM, Mick <michaelkintzios@gmail.com> wrote:
<SNIP>
>
> Check first that you allow connections on port 631 at your dad's firewall from
> your mom's IP/MAC address (nmap or nc your dad's address from your mom's
> machine), e.g.:
>
> $ nc -vv -n -z 10.10.10.4 631
> (UNKNOWN) [10.10.10.4] 631 (ipp) open
> sent 0, rcvd 0

I don't have nc and so far cannot find what package might contain it.
Can you check that for me and I'll emerge but nmap seems to say port
631 on gandlaf (the server) is open:

DesertFlower ~ # nmap gandalf

Starting Nmap 4.60 ( http://nmap.org ) at 2008-06-15 11:10 PDT
Interesting ports on Gandalf (192.168.1.2):
Not shown: 1713 closed ports
PORT STATE SERVICE
22/tcp open ssh
631/tcp open ipp
MAC Address: 00:26:54:11:0F:BC (3Com)

Nmap done: 1 IP address (1 host up) scanned in 0.389 seconds
DesertFlower ~ #


>
>> > What commands can I run from the command line to see whether a
>> >printer is available? My parents are not terribly computer literate
>> >(who is in their 80's) so I need to ensure this is really working
>> >before I tell them to use it.
>
> $ lpstat -a
>
> will show you any printers that have been configured on your mom's machine.
>

Unfortunately this is where things die:

DesertFlower ~ # whoami
root
DesertFlower ~ # lpstat -a
lpstat: Forbidden
DesertFlower ~ #

so solving this issue will likely start to open other things up.

I've managed to get CUPS configured on their print server and my mom's
machine such that she can see the printer, but when I try to print a
test page I get a 403 Forbidden page which I'm assuming for now is
CUPS version of the lpstat -a error message.

Can you tell me whether the lpstat:Forbidden is saying the remote
machine (my mom's) cannot use lpstat at all or does this mean the
print server (my dad's machine) isn't allowing connections?

Thanks,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-15-2008, 08:13 PM
"Mark Knecht"
 
Default Detecting printers at a remote site

On Sun, Jun 15, 2008 at 12:38 PM, Mark Knecht <markknecht@gmail.com> wrote:
<SNIP>
> DesertFlower ~ # lpstat -a
> lpstat: Forbidden
> DesertFlower ~ #
>

This was a permissions issue in cupsd.conf on the print server. I had
the allow/deny stuff out of order. So much for thinking I can follow
directions.

I cannot check the the page actually printed correctly as no one's
home but watching the progress inside CUPS on my mom's machine it
looked OK and looking in the server it said it printed so most likely
everything is working.

Thanks again for the great write up. It helped me and and will likely
help others in the future. Thanks!

Cheers,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-16-2008, 05:05 AM
Francesco Talamona
 
Default Detecting printers at a remote site

> I don't have nc and so far cannot find what package might contain it.

nc is in net-analyzer/netcat

Ciao
Francesco

--
Linux Version 2.6.25-gentoo-r4, Compiled #1 PREEMPT Sun May 18 08:04:58
CEST 2008
One 2.2GHz AMD Athlon 64 Processor, 2GB RAM, 4408.92 Bogomips Total
aemaeth
--
gentoo-user@lists.gentoo.org mailing list
 
Old 06-16-2008, 05:19 AM
Mick
 
Default Detecting printers at a remote site

On Sunday 15 June 2008, Mark Knecht wrote:
> Mick,
> Thanks for the great write up. I really appreciate it.

You're welcome. :-)

> On Sun, Jun 15, 2008 at 10:02 AM, Mick <michaelkintzios@gmail.com> wrote:
> <SNIP>
>
> > Check first that you allow connections on port 631 at your dad's firewall
> > from your mom's IP/MAC address (nmap or nc your dad's address from your
> > mom's machine), e.g.:
> >
> > $ nc -vv -n -z 10.10.10.4 631
> > (UNKNOWN) [10.10.10.4] 631 (ipp) open
> > sent 0, rcvd 0
>
> I don't have nc and so far cannot find what package might contain it.
> Can you check that for me and I'll emerge but nmap seems to say port
> 631 on gandlaf (the server) is open:

You want netcat (net-analyzer/netcat), or one of the telnet packages, but nmap
does the job. As shown below there's no firewall blocking port 631 on your
dad's machine.

> DesertFlower ~ # nmap gandalf
>
> Starting Nmap 4.60 ( http://nmap.org ) at 2008-06-15 11:10 PDT
> Interesting ports on Gandalf (192.168.1.2):
> Not shown: 1713 closed ports
> PORT STATE SERVICE
> 22/tcp open ssh
> 631/tcp open ipp
> MAC Address: 00:26:54:11:0F:BC (3Com)
>
> Nmap done: 1 IP address (1 host up) scanned in 0.389 seconds
> DesertFlower ~ #
>
> >> > What commands can I run from the command line to see whether a
> >> >printer is available? My parents are not terribly computer literate
> >> >(who is in their 80's) so I need to ensure this is really working
> >> >before I tell them to use it.
> >
> > $ lpstat -a
> >
> > will show you any printers that have been configured on your mom's
> > machine.
>
> Unfortunately this is where things die:
>
> DesertFlower ~ # whoami
> root
> DesertFlower ~ # lpstat -a
> lpstat: Forbidden
> DesertFlower ~ #
>
> so solving this issue will likely start to open other things up.
>
> I've managed to get CUPS configured on their print server and my mom's
> machine such that she can see the printer, but when I try to print a
> test page I get a 403 Forbidden page which I'm assuming for now is
> CUPS version of the lpstat -a error message.
>
> Can you tell me whether the lpstat:Forbidden is saying the remote
> machine (my mom's) cannot use lpstat at all or does this mean the
> print server (my dad's machine) isn't allowing connections?

Yes, I would look again at the LAN IP addresse(s) that you have allowed
connections from in the cupsd.conf file(s).
--
Regards,
Mick
 

Thread Tools




All times are GMT. The time now is 09:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org