Linux printing help for a Windows user
Topic: Linux printing help for a Windows user
started by: john.martzouco
Posted by john.martzouco on Dec. 22 2007,14:11Hi All,
I'm on the cusp of setting up a printer on Linux for the first time in my life.
I've noticed CUPS and ApsFilter, but I'm pretty confused about where I should get started.
If you could walk me through this the first time, I'm sure it'll save me hours of frustration. When I understand what I'm doing, I'll fill up the Printing / Printer Setup section of the < Compared to Windows > Wiki page.
Posted by roberts on Dec. 22 2007,15:40Aps Filter is covered in the pdf docs available for download.
It is also covered in the DSL Book pages 90-95 with many screen drops. Success with Aps Filter depends on your printer and setup.
Again older hardware is better supported. Although newer hardware can usualy be made to do basic printing. Option 4 Gimp-Print and choosing a basic LaserJet will usually do it as most printers will offer or respond to the basic LaserJet standard.
The most current printers and the all-in-one printers require CUPS and likely an extension. Juanito, I recall, has had success with all-in-one printers using such.
Posted by john.martzouco on Dec. 22 2007,15:59Thanks Robert,
I'll investigate the points that you've mentioned.
I forgot to mention my printer details, and I think I will at this time to help things along.
I'm printing to a newish HP Deskjet ink jet printer.
As it is wireless (wifi), I've got it installed as a network printer on its own IP address.
1) < HP Deskjet 6980 >
2) < HP recommends using their HPLIP with CUPS. >
3) < The 6980 is listed at Sourceforge. > The Min. HPLIP Version llisted is 0.9.8 and the Print Class is listed as DJGenericVIP.
With this information, is my next step to start with Aps Filter, CUPS, building the latest HPLIP from source? I feel a little lost with the possibilities at hand.
I will start fumbling with this soon.
Posted by ^thehatsrule^ on Dec. 22 2007,22:30Did you try the mydsl extensions by Juanito?
Posted by john.martzouco on Dec. 22 2007,22:44
No, I didn't know they exist. Which category? Which extensions?
Posted by ^thehatsrule^ on Dec. 23 2007,03:23The printing ones that you have written about i.e. hplip, cups etc.
You can help yourself by doing a forum/wiki/extension search.
Posted by john.martzouco on Dec. 23 2007,15:10Thanks hats,
Got Juanito's extensions up and running.
It took me 4-1/2 hours and I already had the packages downloaded. I've written some scripts to make the process easier for next time and I'll upload them on a thread in Extensions.
Posted by jpeters on Dec. 25 2007,20:50
Next time it should only take you about half the time
Posted by john.martzouco on Dec. 26 2007,03:51It takes about 5 minutes now. I put the config files into my backup.tar.gz And I created a tar.gz for each of the 2 UCIs that need to be permanent... run one script and they get installed to opt for an HD install.
Posted by john.martzouco on Dec. 29 2007,19:31I've successfully printed test pages from the CUPS browser configuration page. I've also successfully printed a test page from Ted.
I'd like to configure some of the other applications I'm using in DSL to print as well. I've tried a few and each one seems to need its own configuring. I'm hoping that there's a single place where I can set something up and have it affect all the apps.
Can anybody help me with this?
I'd like to print from:
4) my Windows editor running under Wine (< Multi-Edit >)
I've set up the printing symlinks as detailed in the hplip.info file:
Posted by jpeters on Dec. 30 2007,22:57
Beaver, OO, etc., seem to work with the print dialogue. Firefox defaults to a postscript printer, but has a properties window that lets you put in a print command.
Posted by roberts on Dec. 30 2007,23:21Have you exported your printer?
where "lp" is what you named your printer.
Posted by jpeters on Dec. 30 2007,23:25May be of help
< http://www.mattcutts.com/blog/change-default-printer-linux-firefox/ >
Posted by john.martzouco on Dec. 30 2007,23:52
No, I didn't know about this step.
How do I find the name of my printer? I used CUPS to set it up and chose a .ppd file.
Posted by john.martzouco on Dec. 30 2007,23:53
What is OO please?
Posted by jpeters on Dec. 31 2007,00:07
Open Office; it worked by default after setting up with apsfilter.
Posted by Juanito on Dec. 31 2007,10:38I seem to recall you mentioned you were using a hp all-in-one printer. If so, then you can use the command "hp-info" to list plenty of details about your printer including the full hp uri and the cups printer name. There are also a bunch of other useful "hp-xxx" commands you can find in /opt/hplip/bin (or maybe ../sbin).
I'm not in front of my dsl desktop at the moment, but I thought the info file mentioned how to print from firefox, openoffice, etc?
Posted by jpeters on Dec. 31 2007,15:13
Firefox has it's own printer defaults set in "about:config" The defaults that work for ted, bash, OO, etc., don't work with FF (at least they haven't with my online samba setup through apsfilter).
Posted by roberts on Dec. 31 2007,15:42Another option for consideration... Use print to file.
Many times, I just want to print something and I don't have my printer online, or daemon started, or paper loaded, etc, etc. I just don't want to be interrupted from what I am doing.
So now with my 4.x setup, I always print to file. Then when I am ready to print. I just drag-n-drop my print files over my printer icon and do my printing in batches.
Posted by john.martzouco on Dec. 31 2007,15:42Thanks for the help gents, I've made progress.
To make GIMP 1.2 print correctly after this, the -o raw printing option needs to be changed to -o raster in GIMP's printing dialog page.
I haven't installed Open Office yet, will soon enough.
I think I'd need to append the hp path to be able to use any of those hp-xxx commands. I tried hp-info while pwd in it's directory, but it coughed up a polite error message about missing bits.
Also, it would be super helpful if the < http://localhost:631 > page were there. If only it hosted links to the sub-pages (admin, printers, jobs etc), it would make managing the printers a lot easier. I'll eventually write one up for myself, if you like, I can post it.
Posted by jpeters on Dec. 31 2007,23:01
Sound's like a great idea. Where's the printer icon?
Posted by roberts on Dec. 31 2007,23:09It is in Apps->System folder, the Printing icon.
Copy-Drag to your desktop.
It calls /usr/local/bin/printing.lua
It is something I added in 4.0RC2 see change-log entry
The other benefit, is that I can stay mobile with my pendrive. Print to file and print hardcopy when I get home.
Posted by jpeters on Dec. 31 2007,23:47
It didn't work with my setup, but I'll play with it when I have more time later (I"m using samba network printer). Thanks
Posted by roberts on Jan. 01 2008,00:35When you have a chance, any input for improvement to work with other environments is always appreciated.
Posted by jpeters on Jan. 01 2008,06:42Here's the results with an arg through aterm. Samba networked printer is working through apps (beaver, ted, oo, etc). Spool: /var/spool/lpd/HP940c
dsl@box:~$ /usr/local/bin/printing.lua ab
Fatal error - Another print spooler active, possibly lpd process '1291'
sending job 'dsl@box+356' to lp@localhost
connecting to 'localhost', attempt 1
connected to 'localhost'
requesting printer lp@localhost
job 'dsl@box+356' transfer to lp@localhost failed
error 'NONZERO RFC1179 ERROR CODE FROM SERVER' with ack 'ACK_FAIL'
sending str '^Blp' to lp@localhost
error msg: 'spool queue for 'lp' does not exist on server box'
error msg: ' non-existent printer or you need to run 'checkpc -f''
Posted by roberts on Jan. 01 2008,16:04I don't use Windows, so no need to use Samba.
Also, I don't need or use Cups.
I have three questions for your Samba printer setup.
1. When Samba printing is enabled, if you go to the DSL control panel, does the "Printing/Lpd" button show as depressed?
2. What is the output and location of your printcap file.
3. Is your print command of the form: lpr -h -Pprinter_name file_to_print
Posted by jpeters on Jan. 01 2008,23:08Printing/lpd is not depressed
Here is the /opt/printcap:
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
# APS1_END - don't delete this
Print command: lpr -h -PHP940c file works. Thanks for the tip
(now I can create my own icon)
Posted by roberts on Jan. 01 2008,23:29If lpd is not running then what process is doing the printing?
I see in my script, where I use the ApsFilter default printer name of lp. That is easily changed to extract from printcap.
Are you running cups?
What is the output of ps | grep lpd
Ah, I bet you are probably running gnu-utils which changes the default output of ps.
My script works with default DSL.
Adding extensions that change system core functons is not something I want to try to handle.
Anyway, it should be trivial for you to setup your own drag-n-drop printing.
Posted by jpeters on Jan. 02 2008,00:23
That must be it...I'm running gnu-util, and there is no lpd in ps.
So instead I worked for hours on this elaborate script:
lpr -h -PHP940c $1
Thanks, this works nicely. Now if I could only figure out what's up
with Firefox printing. (although it's simple enough to copy-paste to OO for printing).
Edit: I checked FF on my XP; FF sets up about 50 lines of code in
about:config for the default printer!!
Edit2: I wonder if there's anything available like the HP printing utility that supports drag & drop and recognizes format (html, pdf, etc.)
Posted by jpeters on Jan. 02 2008,03:10Good news....Samba printer works with Opera, no problem!
Posted by Juanito on Jan. 02 2008,17:08
- but it is there, I mean you have to enter "http://localhost:631" once in firefox and save it as a bookmark, but after that it works fine??
Posted by john.martzouco on Jan. 02 2008,18:02No Juanito,
Calling up the localhost:631 gives me a 404 Not Found error.
The subpages are fine (e.g. localhost:631/printers). But I only know by luck that they exist.
Posted by roberts on Jan. 02 2008,18:09@ john.martzouco,
Please keep extension discussion in the extension area.
Cups is not part of DSL. It is a MyDSL extensions. It becomes confusing when later searching.
Posted by roberts on Jan. 02 2008,18:13@ jpeters,
Since you are using apsfilter's standard print command, I don't understand the issue with Firefox printing.
I can directly print from firefox by entering File->Print->Properties and Print Command and enter the usual...
lpr -h -Plp
Works fine for me.
Posted by jpeters on Jan. 03 2008,00:00
Neither do I....I've tried that and "lpr -h -Pprintername", lpr -h -Pprintername@box, and a few others, in addition to following some recommendations for changing various about:config settings. Bottom line is that if FF recognized the default printer, it would appear automatically (or as an option in the dropdown menu for selection.