LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2006, 12:43 AM   #1
Chinook
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Rep: Reputation: 0
Sharing Linux printer with Mac


P4 with Debian Etch (testing), kernel 2.6.12-1-686,
Gnome desktop and USB attached printer and scanner

PMac G5 running OS X Tiger (10.4.4)
......................................................................................

I've got my AppleTalk/zeroconf LAN setup working for file sharing - with netatalk and task-howl on the Linux box.

When I had my printer connected to my Mac I could print to it from the Linux box with just CUPS whether the Mac AppleTalk connection with the Linux box was active or not. Then I decided I wanted more desk space around my Mac and moved the printer to my Linux box. Now I can print from my Linux box, but I can't seem to figure out how to print to it from my Mac :-P

For once I'm finding the printer setup on my Mac the more difficult :-( I've tried it outside the AppleTalk connection by simply supplying an address of 192.168.2.69:631 and though the printer definition is accepted, actual printing says the printer is busy. I've also tried it with the AppleTalk connection up, again supplying the same address, with the same results. I've also tried variations of addresses without success.

I'm sure I'm tripping over the obvious but what??? Is there a way to specify the Linux printer from my Mac outside AppleTalk? Or if I need to through AppleTalk, do I need to further edit my Linux netatalk setup - maybe the papd.conf???

If I do need to (somehow) use the Linux printer with AppleTalk, there is another lesser question. How do I ensure that the howl tools (mDNSResponder for advertising) start at login like afpd and atalkd. Following is the mDNSBrowse info if it's any help.

I'm keeping notes on the detail steps in order to share the setup with anyone else they might help, so if you want to see the detail steps I've taken so far I can send along the text file or put it up on my dotMac account for download.

Thanks,
Lee C


debian1:/home/leec# /etc/init.d/mdnsresponder restart
Stopping Rendezvous service discovery responder daemon: mDNSResponder.
Starting Rendezvous service discovery responder daemon: mDNSResponder.
debian1:/home/leec# mDNSBrowse _afpovertcp._tcp
browse reply: Add Service debian1 _afpovertcp._tcp. local.
browse reply: Add Service debian1 _afpovertcp._tcp. local.
resolve reply: debian1 _afpovertcp._tcp. local. 169.254.103.69 548
resolve reply: debian1 _afpovertcp._tcp. local. 169.254.103.69 548
resolve reply: debian1 _afpovertcp._tcp. local. 169.254.103.69 548
resolve reply: debian1 _afpovertcp._tcp. local. 169.254.103.69 548
browse reply: Add Service slpmacg5 _afpovertcp._tcp. local.
browse reply: Add Service slpmacg5 _afpovertcp._tcp. local.
resolve reply: slpmacg5 _afpovertcp._tcp. local. 192.168.2.14 548
resolve reply: slpmacg5 _afpovertcp._tcp. local. 192.168.2.14 548
resolve reply: slpmacg5 _afpovertcp._tcp. local. 192.168.2.14 548
resolve reply: slpmacg5 _afpovertcp._tcp. local. 192.168.2.14 548
 
Old 01-22-2006, 02:14 AM   #2
Chinook
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Really is a networking problem

Chinook wrote:
> P4 with Debian Etch (testing), kernel 2.6.12-1-686,
> Gnome desktop and USB attached printer and scanner
>
> PMac G5 running OS X Tiger (10.4.4)
> ......................................................................................
>
> I've got my AppleTalk/netatalk/zeroconf LAN setup working for file sharing - with netatalk and task-howl on the Linux box.
> <...snip>


Well, by burying myself in the CUPS tomes, I made some changes to cupsd.conf network options (HostNameLookups, Browsing, BrowseProtocals, BrowseAddress and Allow) on the Linux side and I now see my Linux printer in my Mac CUPS Administration and in print dialog on my Mac. i.e. I don't have to define the printer again on the Mac side - duh.


Great :-) but I can't actually print to it :-()


The issue is something that I wondered about (and commented on) early on. On my Mac I see the printer EpsonSPR300@debian1 but my Mac can't actually print to it because my Mac (via my router) can't resolve the hostname "debian1."

When I first put up Debian on the P4, I noticed that where my Mac sets a hostname with its local address on my Belkin router, the Linux box leaves the hostname blank on my Belkin router. My router does have the Linux box represented as an address (192.168.2.48), but no hostname.


When the printer was attached to my Mac I could print to it from my Linux box it because the Mac hostname (pmacg5) could be resolved by the router, but now that the printer is attached to my Linux box (and working there) I can't print to it from my Mac because it can't resolve the Linux box hostname (debian1) :-(((( I had a strong feeling this hostname issue would come back to bite me %-\


So, whats to do? Preferably I'd really appreciate some help in getting Debian to post its hostname on the router like my Mac does. If that can't be done at the moment, then I would appreciate some help in getting my Mac to resolve the Linux box hostname to an address (192.168.2.48).

Sorry to be such a bother, but all my research has brought me back to the one issue I could not find an answer for when first installing Debian on my P4.

Thank you for your patience, Lee C
"Life is judged with all the blindness of life itself." -- George Santayana
(see Backup::Restore article http://homepage.mac.com/lee_cullens/Bx3.html )
(see Artworks sampling http://homepage.mac.com/lee_cullens/Artworks.pdf )
 
Old 01-22-2006, 06:02 AM   #3
snake138
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
is debian1 actually set as the hostname on the linux box? i'm guessing it is, or you wouldn't be mentioning that it can't be resolved, i'd expect. will the mac let you define it by ip rather than hostname? if it will, use that. not sure what the syntax is under mac, but in windows it would still be //192.168.2.48, i believe. another alternative, if mac supports it, would be samba.

one other issue you will need to be careful of. you may need to define a raw-q printer, in cups, on the linux box, if the mac is formatting print output. the raw q just takes the data and sends it to the printer, without mod'ing it. had that problem printing from my windows boxes to the linux printer. also found that the Print Test Page button won't work in windows, even though i can still print from applications just fine. never have figured out why that is, but it's never been important, since applications can print ok and that's all i needed anyway. can print test pages from within cups or even just from the main printer setup in linux.
 
Old 01-22-2006, 11:34 PM   #4
Chinook
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the reply snake138,

Samba is not an option to me for personal reasons and a raw-q printer is not necessary (not even an issue at this point). Debian Linux and Mac OS X Darwin are just two variants on the *nix theme and both are using CUPS.

Your comments are appreciated :-)

An update of where I'm at:

I have browsing on on the Linux box and I can see the Linux printer from the CUPS interface (even see it in app print dialog) on my Mac. Trying to print anything though first resulted in my Mac saying it can't can'r resolve the hostname or even 192.168.2.48

(I made changes to cupsd.conf network options (HostNameLookups, Browsing, BrowseProtocals, BrowseAddress and Allow) on the Linux side)


I added
send host-name "debian1";
to /etc/dhclient.conf on the Linux so it now posts its hostname to the router.


On my Mac I also added
192.168.2.48 debian1
to /etc/hosts. To make sure such got completely "into" the system I booted from another volume and cleared the caches on my working volume, repaired permissions, verified the volume (and even double checked it with DiskWarrior to make sure I didn't screw anything up). Then I rebooted to my working volume and rebooted the Linux box.


If I try to print to the shared printer, my Mac still says it can't resolve the host for printer EpsonSPR300@debian1


I've also tried creating a printer on my Mac that points to the Linux printer (tried http, ipp and lpr) and with Printer Sharing on or off, I get "host 192.168.2.48 is busy - will try again in 30 seconds." 8-P (I pointed at xxx://192.168.2.48:631/printers/EpsonSPR300)

I'm not sure where to turn from here - Maybe I'll start the netatalk "Mac Classic" daemons (atalkd and papd) on the Linux side and try to print to it with AppleTalk. Something I really don't want to do because I don't need the Classic daemons otherwise and from everything I've read I should be able to share the printer with CUPS alone.

Thanks for your interest,
Lee C
 
Old 01-26-2006, 12:55 AM   #5
Chinook
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Original Poster
Rep: Reputation: 0
If someone else looks here for an answer, I thought I'd post my solution.

What I found at the end of the cupsd.conf file on the Linux box was the line:
Include /etc/cups/cups.d/ports.conf
So I looked at the ports.conf file and it had one line:
Listen localhost:631
The Linux box was only listening to port 631 on the localhost, not the LAN %-/ I removed the "localhost:" part of the line and the sky opened up :-)
 
  


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
Using Samba or Netatalk for Linux to Mac File Sharing maelstrom209 Linux - Networking 1 04-25-2006 11:59 AM
Sharing internet to a Mac from Linux using a crossover cable: is it possible? Blash Linux - Networking 3 12-05-2005 10:57 AM
Sharing internet from Mac to Linux(PC) - Some sort of DNS problem? lloyd_smart Linux - Networking 8 05-18-2005 05:08 PM
Printer sharing Linux to Windows Celettu Linux - Networking 0 07-20-2004 11:26 AM
Linux Printer with Mac lramos85 Linux - Networking 1 03-14-2004 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:54 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