View previous topic :: View next topic |
Author |
Message |
sessionID Apprentice
Joined: 11 Nov 2002 Posts: 266 Location: hungary
|
Posted: Tue Nov 12, 2002 10:18 pm Post subject: A n00b's guide to set up printing with CUPS |
|
|
Before I start, let me say that Gentoo has excellent documentation, great support forum - from the start of the installation everything worked as it should ...
... The only thing that gave me a 9 hour work (and sometimes I've felt quite disapointed and hopeless) was the cups setup.
So let me outline how I could get my HP Laser Jet 4 to work, maybe this will help some not-so-linux-talented ppl like me to make it as fast and painless as possible.
At first: read the Gentoo Printing Guide first. Do exactly as it tells You. Study the parts about kernel settings (paralell port /or usb/ compatibility have to be compiled in, at least as a module).
If the "official" steps don't work... try it my way
1. unmerge cups, gimp-print-cups and ghostscript.
Code: |
# emerge unmerge gimp-print-cups
# emerge unmerge cups
# emerge unmerge ghostscript
|
2. merge cups 1.1.14-r4 (oldest version in portage right now), than merge gimp-print-cups 4.2.0-r1 (also the oldest version), finally merge ghostscript.
[A lot of posts suggested this in the forums.]
Code: |
# emerge /usr/portage/net-print/cups/cups-1.1.14-r4.ebuild
# emerge /usr/portage/net-print/gimp-print-cups/gimp-print-cups-4.2.0-r1.ebuild
# emerge ghostscript
|
3. As root, start the cups server:
Code: | # /etc/init.d/cupsd start |
4. Open up a browser, and go to http://localhost:631
You should see a web-based cups administration interface.
[If prompted for name&password, enter root/root-password]
5. Click on "printers", than on "Add printer".
6. Enter anything for name, location and description (like "My Printer", "local", "HP Laser Jet", but it does not matter).
7. You will be promted for the "device": select parallel port [or if You have an USB printer, select USB - see the Gentoo Printing Guide about this].
8. Select the maker of your printer.
9. On the next page, select the model.
10. Click OK, and You have a new printer, that can (and maybe should) be customized in the Printers >> Configure printer menu.
11. Print a test page. If it works, You're ok, enjoy printing
12. If You could not find the driver for Your printer in step 8/9, than visit the LinuxPrinting.org's printer database, and try to find your printer by selecting the manufacturer and model name.
13. Click on "Show". This will give You details about the printer's driver.
14. Click on a driver (for HP LJ 4 You'll have several, just click on the recommended). This will take You to the PPD-O-MATIC page.
15. Select Your printer from ppd-o-matic's list, and click on "Generate PPD file".
16. You'll get a nice driver file right in your browser. Near the top of this file, You'll see a line like this:
*% You may save this file as 'Brother-HL-10h-ljet4.ppd'
17. Save it with the suggested name.
18. Su to root, and copy this file to /usr/share/cups/model.
19. Restart the cups server with the command
Code: | # /etc/init.d/cupsd restart |
20. Now repeat steps 8/9, and You should see the downloaded driver in the "Model" list.
That's it, You customize the printer, and it's ready to go.
I hope....... |
|
Back to top |
|
|
karl11 Guru
Joined: 25 Jun 2002 Posts: 469 Location: Raleigh, NC
|
Posted: Wed Nov 13, 2002 3:36 am Post subject: cups 1.1.17 |
|
|
I agree wholeheatedly about cups 1.1.14, however, the new 1.1.17 works now and is the standard that portage is grabbing. It's a pre-release, but the first release since 1.1.14 that has worked for me |
|
Back to top |
|
|
Darthanubis Tux's lil' helper
Joined: 18 Oct 2002 Posts: 77
|
Posted: Thu Nov 14, 2002 8:04 am Post subject: |
|
|
I LOVE YOU MAN!!!! |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Tue Nov 19, 2002 4:40 am Post subject: |
|
|
Moving from Hardware and Laptops as this is a very nice guide. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
perry Tux's lil' helper
Joined: 18 Nov 2002 Posts: 142 Location: Cornfields of Indiana
|
Posted: Thu Nov 21, 2002 1:42 am Post subject: |
|
|
Worked for me I was able to print a test page from the CUPS web interface and from OpenOffice (under KDE) without having gimp-print-cups installed. As the name implies, I guess it's only needed if you want to print from Gimp? |
|
Back to top |
|
|
Elm0 Apprentice
Joined: 24 Nov 2002 Posts: 281 Location: UK
|
Posted: Sun Nov 24, 2002 7:07 pm Post subject: A few tips on some esoteric HP printers |
|
|
In an oh-so-intelligent move, HP decided to release some printers in 2000 that operated some what like that cheap and ugly devil-spawn piece of hardware, the WINMODEM. Instead of having all the processing parts inside the printer, the drivers offloaded all the calculations to the host system's CPU, meaning reduced costs overall, although somewhat tellingly, these savings weren't passed onto the consumer much.
Basically, this means that printers listed below do not work correctly with the standard HP driver included with CUPS.
HP Deskjet 710
HP Deskjet 712
HP Deskjet 720
HP Deskjet 722
HP Deskjet 820
HP Deskjet 1000 series
A sympton to look out for is that when you print the test page using CUPS it seems to say the page has been sent to the printer, but nothing comes out.
Therefore follow these easy steps after following the instructions at the top of this page by SessionID (as a side note, the latest versions of CUPS and ghostprint worked fine for me):
1. Install the special HP Deskjet drivers
2. Edit /etc/pnm2ppa.conf file. Here I have selected the model of my printer, the 720C.
Code: |
#-----------set the printer model---------------------------
# YOU MUST CHOOSE ONE OF THE FOLLOWING, EVEN IF YOU DO NOTHING ELSE!
#
# If there is more than one "version" entry activated, the last one
# will be used. The printer version can also be set with the command line
# option e.g., "-v 720".
version 720 # 710, 712, 722 also acceptable
#version 820
#version 1000
|
3. Visit http://www.linuxprinting.org/show_driver.cgi?driver=pnm2ppa then in the drop-down menu for PPD-O-Matic (NOT the old PPD-O-Matic menu) select your model of printer. Save this output as a text file under /usr/share/cups/model/. You can choose any filename you wish as long as it has the extension .ppd
You should now have a driver available when you select Add Printer on the CUPS configuration web server, underneath the HEWLETT-PACKARD manafacturer section (not HP). Select this, then your printer (there will only be one) and you should be able to print a test page no problems.
Elmo |
|
Back to top |
|
|
S_aIN_t Guru
Joined: 11 May 2002 Posts: 488 Location: Ottawa
|
Posted: Fri Nov 29, 2002 7:19 am Post subject: |
|
|
thanks for this.. although i ended up with the new version of CUPS anyway.. it seems to work.. i guess unmegring and merging again did something..
thanks again.. |
|
Back to top |
|
|
Tuxuser Tux's lil' helper
Joined: 28 Oct 2002 Posts: 136 Location: Solingen / Germany
|
Posted: Fri Nov 29, 2002 4:55 pm Post subject: device url |
|
|
The web interface requires from me a devive url right after selecting LPD/LPR as port. I'm afraid this is the point where I'm failing to install my parallel printer.
What did you set at this point, or do I make something wrong at some other stage that this input is required? |
|
Back to top |
|
|
sessionID Apprentice
Joined: 11 Nov 2002 Posts: 266 Location: hungary
|
Posted: Fri Nov 29, 2002 6:45 pm Post subject: Re: device url |
|
|
Tuxuser wrote: | The web interface requires from me a devive url right after selecting LPD/LPR as port. I'm afraid this is the point where I'm failing to install my parallel printer.
What did you set at this point, or do I make something wrong at some other stage that this input is required? |
If You have a paralell printer, why not select paralell port in the setup?
You can select it afther giving the new printer a name. |
|
Back to top |
|
|
Tuxuser Tux's lil' helper
Joined: 28 Oct 2002 Posts: 136 Location: Solingen / Germany
|
Posted: Sat Nov 30, 2002 5:52 am Post subject: |
|
|
Your question sounds reasonable but in the seletion menu I can coose only from this list:
AppSocket/HP JetDirect
Internet Printing Protocol (http)
Internet Printing Protocol (ipp)
LPD/LPR Host or Printer
SCSI Printer
Serial Port #1
Serial Port #2
USB Printer #1
USB Printer #2
...
USB Printer #16
|
|
Back to top |
|
|
Tuxuser Tux's lil' helper
Joined: 28 Oct 2002 Posts: 136 Location: Solingen / Germany
|
Posted: Sat Nov 30, 2002 2:38 pm Post subject: Success! Parallel Port wasn't completely supported in kernel |
|
|
I made it. Trick was that the parallel port is mentioned twice in the kernel configuration.
First: "Parallel port support" (obvious)
Second: "Character devices" (less obivous) |
|
Back to top |
|
|
pablo_pita n00b
Joined: 05 Jan 2003 Posts: 25 Location: Frankfurt
|
Posted: Sun Feb 02, 2003 2:37 pm Post subject: Re: A few tips on some esoteric HP printers |
|
|
Elm0 wrote: |
You should now have a driver available when you select Add Printer on the CUPS configuration web server, underneath the HEWLETT-PACKARD manafacturer section (not HP). Select this, then your printer (there will only be one) and you should be able to print a test page no problems.
Elmo |
Only add that you need to re-start CUPS to see the HEWLETT-PACKARD manafacturer section.
This setup description has been quite useful for me as I was wandering in the net to find all the elements to setup my HP 720C. Thanks ! |
|
Back to top |
|
|
whit Tux's lil' helper
Joined: 26 Oct 2002 Posts: 121 Location: VT
|
Posted: Fri Feb 07, 2003 5:44 pm Post subject: how to print test page with cups 1.1.18r2 |
|
|
I was getting a permission denied message in my browser when trying to print the test page. There's a section in /etc/cups/cupsd.conf that needs to be edited to allow permission. Go to <Location /printers/name>, change "name" to the name you used for your printer (which you may have discovered cannot have spaces in it - although the error message from cups at that earlier stage complains about the number of characters rather than being to the point). Uncomment this Location line, as well as the </Location> line below it, and add something like "Allow From All" in between (and perhaps uncomment the Order line - I did, not sure if it's required).
By doing this I am able to print a test page. (It's not a good test page, but that's a different problem - the driver for my printer must be wrong - got to find the stair stepping fix and apply it, if the result of a simple cat is diagnostic.)
You'd probably want more restrictive permissions in a shared network than "All".
Oh, and now I discover that /admin similarly installs with permissions allowing no access. Guess it's time for bugzilla Further notes: not one of the 3 cups setups for a HPIIIp actually works. None of the graphics on the /admin cups cgi pages display. Guess I need to look elsewhere to generate a correct IIIp driver file, and then look for a further permissions problem on cups graphic icons.
Then I went to LinuxPrinting.org, as recommended here, and generated a printer control file that actually works for a IIIp. But once again I got permission denied when going to print a test page. This time I fixed it by uncommenting <Location /printers> and the </Location> tag after it, and putting between them "Allow From All". This also fixes the missing graphics in the /admin area.
So the short version of this: Go to LinuxPrinting.org for a current verion of your printer driver, don't trust the stuff already on your system is ideal, or even works. And edit /etc/cups/cupsd.conf to allow access to <Location /printers>. Haven't tested if that's enough, or if <Location/printers/[your_printer> also has to be fixed as above.
Alternate fix on the permissions: looking at the cups logs, some of the connections were coming not from 127.0.0.1 but from the system's fully qualified domain (such as "box.domain.com"). Adding an "Allow From box.domain.com" to <Location /> in cupsd.conf appears to also fix the permissions problems, and is most likely the right way to do it. <Location /admin> also needs this entry for the fully qualified name. |
|
Back to top |
|
|
rasto n00b
Joined: 27 Nov 2002 Posts: 43 Location: NJ
|
Posted: Wed Feb 19, 2003 3:23 am Post subject: ok. got rid of stp problem |
|
|
i found out that stp is old device and that i should use ijs,
so i downloaded new ppd file for my printer and it gives me error that it cannot find ijsgimpprint
D [18/Feb/2003:22:00:43 -0500] [Job 8] foomatic-gswrapper: gs '-dPARANOIDSAFER'
'-dNOPAUSE' '-dBATCH' '-sDEVICE=ijs' '-sIjsServer=ijsgimpprint' '-dIjsUseOutputFD'
'-sDeviceManufacturer=CANON'
'-sDeviceModel=bjc-2000' '-dDEVICEWIDTHPOINTS=612' '-dDEVICEHEIGHTPOINTS=792'
'-r360x360' '-sProcessColorModel=DeviceRGB'
'-sIjsParams=Quality=360x360dpi,InkType=CMYK,MediaType=Plain,
MediaSource=Auto,Dither=Adaptive,ImageType=0,
Density=1.000000,Brightness=1.000000,Gamma=1.000000,
Contrast=1.000000,Saturation=1.000000,Cyan=1.000000,
Magenta=1.000000,Yellow=1.000000' '-sOutputFile=/dev/fd/3' '/dev/fd/0' 3>&1 1>&2
D [18/Feb/2003:22:00:43 -0500] [Job 8] ESP Ghostscript 7.05 (2002-09-02)
D [18/Feb/2003:22:00:43 -0500] [Job 8] Copyright (C) 2002 artofcode LLC, Benicia, CA.
All rights reserved.
D [18/Feb/2003:22:00:43 -0500] [Job 8] This software comes with NO WARRANTY: see the
file PUBLIC for details.
D [18/Feb/2003:22:00:43 -0500] [Job 8] sh: line 1: ijsgimpprint: command not found
D [18/Feb/2003:22:00:43 -0500] [Job 8] ESP Ghostscript 7.05.5: Can't start ijs server
"ijsgimpprint"
D [18/Feb/2003:22:00:43 -0500] [Job 8] **** Unable to open the initial device, quitting.
D [18/Feb/2003:22:00:43 -0500] [Job 8] Couldn't exec foomatic-gswrapper -q
-dPARANOIDSAFER
-dNOPAUSE -dBATCH -sDEVICE=ijs -sIjsServer=ijsgimpprint
-dIjsUseOutputFD -sDeviceManufacturer=CANON -sDeviceModel=bjc-2000
-dDEVICEWIDTHPOINTS=612
-dDEVICEHEIGHTPOINTS=792 -r360x360 -sProcessColorModel=DeviceRGB
-sIjsParams="Quality=360x360dpi,
InkType=CMYK,MediaType=Plain,MediaSource=Auto,
Dither=Adaptive,ImageType=0,Density=1.000000,
Brightness=1.000000,Gamma=1.000000,Contrast=1.000000,
Saturation=1.000000,Cyan=1.000000,Magenta=1.000000,
Yellow=1.000000" -sOutputFile=- - at /usr/lib/cups/filter/cupsomatic line 1097.
D [18/Feb/2003:22:00:43 -0500] [Job 8] tail process done writing data to *main::STDOUT
D [18/Feb/2003:22:00:43 -0500] [Job 8] KID4 finished
E [18/Feb/2003:22:00:43 -0500] PID 2096 stopped with status 32!
D [18/Feb/2003:22:00:43 -0500] [Job 8] error closing *main::KID3 at
/usr/lib/cups/filter/cupsomatic line 892, <STDIN> line 622.
D [18/Feb/2003:22:00:43 -0500] UpdateJob: job 8, file 0 is complete.
D [18/Feb/2003:22:00:43 -0500] CancelJob: id = 8
D [18/Feb/2003:22:00:43 -0500] StopJob: id = 8, force = 0
D [18/Feb/2003:22:00:43 -0500] StopJob: printer state is 3
cannot find this file on my system /usr/bin/ijsgimpprint
what package do i need?
strangely gimp-print gives me
/usr/share/man/man1/ijsgimpprint.1.gz but no /usr/bin/ijsgimpprint !!
OK i FIXED IT!! its not perfect solution but i did it. spend whole night on it.
ijsgimpprint in gimp-print gets build only if it find ijs-config, which in turn is build in ghostscript.
ghostscript has --with-ijs flag but didnt make it, dont ask me why ... i dont know.
so what i did is unpacked esps-... package then cd to ijs,
./configure make make install and after the run emerge gimp-print. test page is printing know ...
it looks like i have another problem, colors are all messed up.
anyway i have to get some sleep before i try to solve this one
Last edited by rasto on Mon Nov 24, 2003 1:01 am; edited 2 times in total |
|
Back to top |
|
|
Ian Goldby Guru
Joined: 18 May 2002 Posts: 539 Location: (Inactive member)
|
Posted: Sat Mar 22, 2003 10:29 am Post subject: |
|
|
Regarding the Gentoo Printing Guide, it's worth pointing out that you don't need foomatic unless the printer that you want to use is not natively supported by CUPS or gimp-print-cups. Since the vast majority of printers that you are likely to use are supported, you probably don't need foomatic.
You may not even need gimp-print-cups. CUPS comes with built-in support for several common printers. I suggest you only install CUPS initially, and then go on to install gimp-print-cups if you need it (e.g. CUPS doesn't list a driver for your printer.)
Having said that, if you are going to be printing photographs, the gimp-print-cups drivers (for the Epson Stylus printers at least) provide very much better quality than the built-in CUPS driver for these printers. |
|
Back to top |
|
|
rakis n00b
Joined: 02 Apr 2003 Posts: 27 Location: Tucson, Arizona
|
Posted: Mon Jun 02, 2003 5:28 am Post subject: Just a suggestion... |
|
|
Just a suggestion, but can somebody make this the de facto guide for setting up CUPS? I thought this was much easier, and much quicker way of getting CUPS up and running. Maybe at least include a link on the Printing Guide...?
Just a thought. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Mon Jun 02, 2003 6:35 am Post subject: |
|
|
Something else that could be added to the cups guide is pdf generation with cups. I use cups-pdf thanks to the npalmer76's ebuild (not in portage yet). I've configured it throw the web admin page, and here is what it has produced:
Code: | root # cat /etc/cups/printers.conf
# Printer configuration file for CUPS v1.1.18
# Written by cupsd on Mon Apr 14 16:11:48 2003
<DefaultPrinter pdf>
DeviceURI cups-pdf:/
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer> |
Now, when a user prints a given file, it produces a pdf: /var/tmp/cups-pdf/<user>/<filename>.pdf
EDIT: I've updated the ebuild in the original bug report. /var/tmp/... is now /var/spool/... with this new version.
Last edited by TGL on Mon Jun 02, 2003 10:16 pm; edited 1 time in total |
|
Back to top |
|
|
smokeslikeapoet Tux's lil' helper
Joined: 03 Apr 2003 Posts: 96 Location: Cordova, TN USA
|
Posted: Mon Jun 02, 2003 9:17 pm Post subject: |
|
|
Nice work. Finally got my printer up and running with little work. Just a couple of notes. I had no problems with the current stable versions of cups. If you're installing a printer for system without xwindows, you can use "lynx localhost:631" but not "links localhost:631" to configure your printer through cups' web interface (this is due to authentication support). Okidata laser printers use HP LaserJet II drivers. (That was my main problem). LinuxPrinting.org helped me out with that one. Good work! _________________ -SmokesLikeaPoet
Folding@Home |
|
Back to top |
|
|
snagar n00b
Joined: 23 May 2003 Posts: 31
|
Posted: Mon Jun 09, 2003 10:32 pm Post subject: |
|
|
about cups-pdf
TGL - I used the latest drive and it seems to work meaning creates the .pdf file but the file does not sent automatically to the printer.
What should I do ? |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Mon Jun 09, 2003 11:17 pm Post subject: |
|
|
snagar wrote: | I used the latest drive and it seems to work meaning creates the .pdf file but the file does not sent automatically to the printer. |
This is the way it's meant to work. It's only a virtual printer driver, to create pdfs from applications which can't export to this format. I don't know how to send a job to two printers (the real one and the virtual one), but their are probably some tips to do that. Any cups expert around? |
|
Back to top |
|
|
wHAcKer Apprentice
Joined: 18 Oct 2002 Posts: 228 Location: Grimbergen, Belgium
|
Posted: Wed Jun 11, 2003 10:19 am Post subject: |
|
|
OMG OMG OMG OMG OMG OMG
I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I tried hours and hours to get my printer working and it never did, not with custom drivers, not with standard drivers NEVER...
I used your guide and it works like a charm first time trying!!!!!!!
i mean, before this i couldn't even cat anything to my printer
now it's the greatest
THANKS MAN!!!!!!!!!!!!!!
seems like i needed other versions of cups/gimp-print-cups
woooooooooohooooooooooooow
/me happy
these forums rock |
|
Back to top |
|
|
sessionID Apprentice
Joined: 11 Nov 2002 Posts: 266 Location: hungary
|
Posted: Wed Jun 11, 2003 12:45 pm Post subject: |
|
|
I should post a paypal button here _________________ ((( WeFunk ))) |
|
Back to top |
|
|
nokiaxv2 n00b
Joined: 10 Jun 2003 Posts: 5
|
Posted: Sat Jun 14, 2003 7:11 am Post subject: Easy installation and setup... |
|
|
but now i'm having an issue...I use the Lexmark Optra E laster printer. When i add a new printer, my printer name and model is listed in parenthesis next to the parallel port. The addition of the printer goes fine, I visit the linuxprinting.org site, get the appropriate printer driver for my specific printer, save it and copy it over to the appropriate folder...Everything sets up superbly...now, when i print a test page...nothing happens, no lights flicker or anything on my printer. On my administration page for cups, this is what is listed (yes, i did restart cupsd):
Lexmark Optra E, Foomatic + ljet4 (recommended)
Description: Lexmark laser printer
Location: MyRoom
Printer State: processing, accepting jobs.
Device URI: parallel:/dev/unknown-parallel0 <---believe that this is my problem
Thats all it does is site there (after pressing test print) with the state saying "Processing" but nothing occurs. Now, was there something else I should have done with gentoo to have my printer/parallel port assigned to something in /dev/
I'm at a stand stick, any help is greatly appreciated...
ghostscript, cups, gimp-print-cups are installed. (gimp-print conflicts with gimp-print-cups)
TIA, _________________ -( nokia )- |
|
Back to top |
|
|
ghetto Guru
Joined: 10 Jul 2002 Posts: 369 Location: BC, Canada
|
Posted: Sat Jun 14, 2003 8:38 am Post subject: |
|
|
I cant seem to get my printer working lately. Ive followed the instructions, and I have installed my printer just like I used to, then restarted cups but when i try to print something all i get is the printer spitting out blank sheets until i cycle cups to make it stop.
Can I get a few tips please on how to trouble shoot and diagnose printer problems?
Can I also get the exact versions of cups ghostscript and gimp-print-cups that people are using so that i know which combinations are known to work?
I am running ~x86 so I have newer versions of the packages mentioned so far and I think maybe its package incompatibility that is causing my problem.
I have a simple printer, and HP deskjet 612C Inkjet printer. It has worked fine with the standard HP Deskjet 600C driver. _________________ Blizzard you suck. |
|
Back to top |
|
|
MrCoffee n00b
Joined: 15 Jun 2003 Posts: 18 Location: Irvine, California, USA
|
Posted: Sun Jun 15, 2003 6:21 pm Post subject: Thanks for the post, that was really helpful. |
|
|
I foolishly spent as much time as you plowing through the same issues. Since I'm also a USB n00b, I didn't know if I had gotten all the USB stuff set up either. Thankfully, after emerging the earlier CUPS and going to the Admin > Add Printers a new device appeared with my printers name on a USB port! The test print worked great. Now sharing so my wife can print from XP! Anyways, thanks again. _________________ Nothing witty here, move along now. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|