Jaguar: Printing with CUPS

by Brian Jepson

I've got an HP OfficeJet d135
with an LIO print server, but the HP printer driver does not work
under Mac OS X 10.2. According to this page, "Hewlett-Packard is aware of this issue and currently working on a solution."



Even if it did work, I hate the HP-supplied print driver. Even
when it's not doing anything, it eats a lot of CPU time. Since Jaguar comes with CUPS, a great Unix printing suite, I was able to find a workaround.



I was not able to add a non-PostScript printer with PrintCenter (/Applications/Utilities).
So, I went to System Preferences->Sharing and started Printer
Sharing. This started cupsd, giving me a CUPS administrative web page
I could visit: http://127.0.0.1:631. From there, I could add a new
printer. This went smoothly. I told it that it was a JetDirect
printer on socket://192.168.254.149/ (your printer's IP address will almost
certainly vary).



For some reason, I couldn't get the test page to print from the CUPS web
interface. However, printing from applications works just fine, and I have my CPU time back for important things!


Have you had any reason to mess around with the CUPS administrative interface? Did it solve problems or create new ones?


23 Comments

surajrai
2002-08-25 07:59:30
How about USB Printers?
How do you go about adding USB printers using CUPS? The don't have IP addresses...


S.r.

curtian4
2002-08-25 18:49:58
HELP: Forbidden: You don't have permission to access the resource on this server
hello,


"Forbidden: You don't have permission to access the resource on this server."


i'm getting the above error when i try to administrate anything on the cups web-admin page. anyone know how to get past this? my users is an admin, and i've also tried this by logging in as root (per the help files), but neither have any effect.


also, i was told that jaguar's new printer sharing/cups would allow me to print to a shared printer on my windows pc. so far, the best i've done is passing a print file to an ldp port on the windows box, which passes the file to my shared printer. the spool shows my actual printer printing, however, this results in no actual paper coming out. this is as far i was able to come with 10.1.5, and sadly, was one of the main reasons i bought jaguar/10.2.


any suggestions would be greatly appreciated. below are my specs.


thanks,
curtian4


specs:
shared printer: lexmark z52
windows pc: win xp
mac: ibook
network: ibook: wireless connection to linksys ap, connected via router to winxp box.



bjepson
2002-08-26 06:39:36
HELP: Forbidden: You don't have permission to access the resource on this server
I've seen this error when I try to connect via http://localhost:631. When I changed the URL to http://127.0.0.1:631, it worked OK. There must be some level of voodoo going on here, since I expect localhost and 127.0.0.1 to be equivalent.


I don't know about printing to a shared Windows printer, since I haven't tried that yet. Perhaps other readers will have some successes they can share.


- brian

steve_wmn
2002-08-26 10:34:39
How about USB Printers?
Use the GIMP-PRINT drivers for CUPS. There is a nice page describing how at
salcedoe
2002-08-26 12:20:52
Scanning?
Hello, have you also figured out how to scan using the d135?


Thanks

bjepson
2002-08-26 13:46:57
Scanning?
I can scan using a web browser and the printer's IP address, as in: http://192.168.254.149/ After the printer's web page appears, I click Scan in the menu on the left.


- Brian

jdouglas
2002-08-27 02:00:58
Adding a USB OfficeJet d145 with Print Center
The trick is to hold down the option key when clicking the "Add" button in Print Center. This enables an "Advanced" option in the top drop-down -- then choose your printer in the "Device" drop-down and the EPS DeskJet driver in the "Model" drop-down. Worked for me!


This tip courtesy of: http://www.allosx.com/1030154694/index_html.

esmalling
2002-08-27 14:51:53
HP Scanning Software on 10.2
I've held off buying 10.2 due to HP's lack of support. If I can get my D145 (USB) working via the gimp-print prog' and still be able to use the HP Scanning software then I'll upgrade ASAP!
knewton1
2002-08-27 18:42:46
Serve Epson printer to Windows?
Now, with Jaguar, this seems as if it should be possible...


I edited the samba config file in /etc to add a print share.


Don't know the appropriate tricks to direct this to the Mac printer so the Windows users can print...


If I can get this to work --
1) My wife can use my Mac printer from her PC so she doesn't use space in the bedroom for a printer.
2) At work, the PCs could print to the Appletalk-enabled HP printer through ethernet instead of the current Parallel-serial net kludge 'solution'. -- without any re-wiring!

mactwigs
2002-08-28 07:26:23
How about USB Printers?
I was able to get my HP OfficeJet v.40 (USB) to work by altering a few things from Brian's article. You will still need to enable Printer Sharing in your Sharing Preference Pane.


First, since there is not an IP address, you will need to get the URI address of your printer. To find this you just need to type a short command in the terminal: lpinfo -v
Several lines of information will appear. You need to find your printer on the list. Copy the line, except for the word 'direct', to your clipboard. You will paste this into the box marked URI when setting up your printer.


Go to the CUPS admin page: http://127.0.0.1:631


Click on 'Add Printer'


Name: Whatever... I typed HP_OfficeJet
Location: Wherever... I typed Home
Description: Whatever... I typed OfficeJet (This is the name that will appear in printcenter.


Continue.


The device i chose was 'USB Printer (usb)'


Continue.


This is where the Device URI from the terminal goes. Should look something like this:
usb://Hewlett-Packard/OfficeJet%20V40?serial=MY15PB256FHI


Continue.


Choose the make of your printer. (HP)


Continue.


Choose the driver. I chose 'HP New DeskJet Series CUPS v1.1 (en)


Continue.


Your printer should now be working. Open a web page and test it out.


--And HP said it would never print on a Mac ;P

esmalling
2002-08-29 16:31:35
HP Scanning Software on 10.2
Answering my own question - I emailed HP about this and here's their reply:


Thank you for contacting Hewlett-Packard's Product Support Technical Center.


We apologize, but currently we do not have any ScanJet scanner software that is
compatible with OS 10.2 nor does the scanning software integrated into the
OfficeJet's all-in-one software currently function with OS 10.2.

curtian4
2002-08-30 10:58:19
got it to work
after about 5 days, i got it work. there were a number of steps, found with a lot of help from message boards such as this one. here's what i did to get my ibook to print on my lexmark z52 printer located on my windows box as a shared printer.


1. to solve my "Forbidden" errors, i went into Netinfo Manager (/Applications/Utitiles/Netinfo Manager) and found that the problem was that my user was not added to /groups/wheel. to do this, i had to authenticate (under security menu). (btw: this requires enabling the root user which i had done previously). to add my user, i went to groups/wheel, selected the "users" property, clicked the directory menu and "inserted value," and made that value equal to my username. i saved my changes and rebooted (though i'm not sure you need to reboot).


2. now i was able to login to the cups admin page, i found this excellent page from one of the message boards:


http://www.macnn.com/news.php?id=16119


i followed the directions, amazing why apple doesn't enable samba printing out of the box LIKE IT ADVERTISES!!! however, this only made me realize that the print driver didn't exist. so, i set out to find the proper driver (lexmark doesn't make it yet).


3. found opensource gimp/cups drivers:


http://www.allosx.com/1030154694/index_html


installed this application. then i went back to step 2, and it all worked!


it took a while to get it, but it finally worked--all done with independant help from the web.


can anyone do a search on apple's knowledge base and show me where it explains how to do this? they advertise that windows print sharing works out of the box--even after asking a number of the apple "geniuses" at the local store. i totally understand that not everyone can know about every minute detail of 10.2, but when i ask a very specific question and am given a very precise answer, i expect it to be correct--especially after paying $129 for an upgrade!


i appreciate all the help i received from reading responses on the messageboards here.


thanks!

anonymous2
2002-09-21 00:15:07
You could also try Gimp-Print....
It supports an overwhelming amount of printers....
anonymous2
2002-09-25 11:50:44
How'd you do it?
Brian,


your editorial on Jaguar printing with cups is EXACTLY what I needed. It was almost as if you wrote the editorial specifically for me as I have an almost exact situation to that which you described.


I wasn't aware of the administration page you provided (at http://127.0.0.1:631/) and was excited to see how it added printers via a web interface.


My situation was troubleing because Apple said that they would not give me support for a 3rd party printer. They directed me to HP who copped out and said that I simply can't print to a network printer (on a Windows network) unless I buy an "HP JetDirect 300X external print server"... (We both know that not to be true)


The people at Easy Software products say that I would need to purchase a several hundred dollar support license to answer a few simple questions that I have about adding my HP printer via the web interface. (I few hundred dollars that I don't have)


I was hoping that you might be able to give me some quick advice.


(My Mac is connected to a Windows ethernet network and I'm trying to access an HP Officejet g85 that's connected to a PC acting as a printer server on that network.)



1.) I went to http://127.0.0.1:631/


2.) I clicked, "manage printers"


3.) (New page) clicked "Add printer"


4.) (New page) In the "Name" field, I gave the printer a name.


5.) In "Location", do I simply type the IP address of the computer (print server) on the network, or do I need to include "smb://" before the IP address (as the print server is listed in the "Connect to server" pop up window in OS X?


6.) In "Description", I entered a description


7.) (New Page) I'm assuming that I choose "Windows Printer via SAMBA" considering it's on a network (even tough its not a REAL network printer.)


8.) (New Page) The "Device URI:" text field starts off with "smb" and gives examples. Do I simply copy one of those in the text field over the pre-existing "SMB", or should I copy and paste the smb with IP path to the print server as shown in OS X's connect to server dialog box or do I copy one of those examples and replace some of its conents with the IP to the print server? (In the meantime I simply copied the "SMB://IP#" of the print server as shown in my connect to server dialog box)


9.) (New Page) I choose HP from the "Make" options.


10.) (New Page) After scrolling throught the "Model" options, I notice that my HP Officejet G85 is not listed. I contacted "Easy Software Products" to which they told me that the Deskjet 900 should work just as well. So I chose that.


11.) When I try to print to the HP, print center shows the job as starting to print, searching for the printer... then it stops the job. Starting the job again results in the same thing happening again.


12.) When clicking on "Printers from the "http://127.0.0.1:631" web site, the Printer State says, "Printer State: stopped, accepting jobs.
"Bad URI - need printer name!"


I figure that I must be configuring some things incorrectly... (Do I need to find the exact name of the printer as described on the print server?) Are there other things I did incorrectly?


Brian, if you (or anyone else in this thread) could help, it would mean the world to me.


- Kelly McNeill

crul
2002-10-25 13:33:50
AWESOME!!!
Mostly, I read weblogs as multicultural entertainment. But this blog had tooth sinking meat! I would have never found itt!!!
anonymous2
2003-01-22 09:22:45
CUPS Web Interface Permission
If you find that changing the URL of your CUPS administrater allows access to forbidden pages (e.g. changing "localhost" to "127.0.0.1"), visit your "cups.conf" file and add the denied host alias as "Allow From " to all relevant sections and it too should work.
bjepson
2003-02-23 17:10:30
HPIJS for Mac OS X
HPIJS for Mac OS X is based on the open source driver that HP released, and it is really easy to install. I just installed it, and it's the first driver I've found that supports two-sided printing with my d135. It supports a whole bunch of HP printers.
anonymous2
2003-04-24 01:45:36
HELP: Forbidden: You don't have permission to access... [solution]
The solution is all in the /etc/cups/cups.conf.


This will have allow/deny settings which might not match your server network settings. The default is to allow 127.0.0.1 (localhost), but it is likely your machine is 192.168.*.*. Focus on this configuration file for your solution, as the error is generated by the CUPS server.


Don't forget to change your firewall(s) to allow access to port 631, and from the LAN only.


Lawrie

anonymous2
2003-10-26 14:17:06
Jaguar and Printing with CUPS
Brian J. and Curtain4 in particular -


Thank you! I can wirelessly print from my iBook.


I went digging into Terminal on my iBook completely green, and your thread lit the way. Your info. is flawless. You've saved me from throwing my money away on a new printer and unecessary print networking hardware, which most likely wouldn't have been compatible anyway. I'd be screaming at some HP tech by this time.


I now must restrain myself from digging into CUPS and Terminal casually, as I am hooked, and I most certainly will get myself into trouble.


SPECS


-iBOOK OSX v10.2.6
-linksys wireless router
- an EPSON Stylus 800 running parallel port to a WIN XP HP Pavillion

pitt
2004-12-08 11:36:26
HELP: Forbidden: You don't have permission to access... [solution]
I'm lost. And I thought I could follow directions. Oh well. I can't manage printers via the web page (access denied) using either locahost or 127.0.0.1 and I can't find this cups.conf file.


Where should I be looking?

bestcea
2005-01-10 21:24:16
10.3.7 CUPS and No pages found! error
I created a CUPS printer using the CUPS web server 127.0.0.1:631/printers. Can add printers, delete jobs, etc via this interface. However I cannot print using CUPS. I run a Test Page and get "No Pages Found!" error. The error log reveals what is below. Any ideas on why this happens and how I can fix it?


After this problem I installed esp ghostscript and gimp-print for whatever this is worth, have been hacking away for a few days, etc.


Thanks in advance.


Cea


I [time stamp] Job 691 queued on 'DJ930CUP' by ''.
I [time stamp] Started filter /usr/libexec/cups/filter/pstocupsraster (PID 2211) for job 691.
E [time stamp] Started filter /usr/libexec/cups/filter/pstocupsraster (PID 2211) for job 691.
I [time stamp] Started filter /usr/libexec/cups/filter/pstocupsraster (PID 2211) for job 691.
I [time stamp] Started filter /usr/libexec/cups/filter/rastertoprinter (PID 2212) for job 691.
I [time stamp] Started backend /usr/libexec/cups/backend/usb (PID 2213) for job 691.
E [time stamp] [Job 691] pstopdffilter/pstocupsraster failed with err number -50
E [time stamp] [Job 691] pstopdffilter/pstocupsraster failed with err number -50
I [time stamp] [Job 691] pstopdffilter/pstocupsraster failed with err number -50
E [time stamp] [Job 691] No pages found!
I [time stamp] Started "/usr/libexec/cups/cgi-bin/printers.cgi" (pid=2214)

bjepson
2005-01-11 05:53:39
10.3.7 CUPS and No pages found! error
I've found that printing has improved much in 10.3, and I haven't had to use the CUPS web interface the way I did in 10.2. Have a look at HPIJS (http://www.linuxprinting.org/macosx/hpijs/), which has better-than-esp drivers for HP printers (from the error messages, looks like you have some kind of deskjet). You should be able to set these up through the Print Center as you would any other printer.


- Brian

thepigs
2005-12-17 17:35:55
HELP: Forbidden: You don't have permission to access the resource on this server
I had this problem too. Tore my hair out trying to fix it. Turns out it was iptables NAT that was breaking http://localhost:631. Clear your iptables and see if that fixes it.
I'm no iptables expert but

iptables -F -A
iptables -t nat -F -A

seemed to do the trick.
Of course fix your iptables once you've confirmed this is the prob...