printer - Ubuntu CUPS printing

07
2014-07
  • Sasha Wang

    I've been fiddling with the for the whole day and couldn't figure out what the problem is due to my lack of knowledge about Ubuntu.

    It all started with me trying to set up a network printer in the command line by following a post (previously someone has setup two network printers to this computer but it is extremely unstable - I get my printout several hours after I submitted the printing job hence I decided to setup the printer again):

    >/etc/init.d/cups stop
    >update-rc.d -f cupsys remove
    >lpstat -a
    

    Now at this point lpstat -a showed me two printers I was originally connected to this computer.

    However after I added the server name to /etc/cups/client.conf, everthing seemed to be acting strangely: lpstat -a gives "no such file or directory" message. And I can't continue with the instructions on the post since the next one lpoptions -d printerName wouldn't work.

    Then I tried to uninstall cups by sudo apt-get purge cups and reinstall it by sudo apt-get install cups and started it by /etc/init.d/cups start

    I also noticed that in the Printers setting, I couldn't add printers anymore. "Sorry! The system printing service doesn't seem to be available" is what it says.

    the command lpstat gives "lpstat: Bad file descriptor"

    I assume CUPS is just one of many ways of setting up printing. There might be more than one services(daemon) running?

    By the way (if this also be a hint for diagnose the problem): I can get to localhost:631 the CUPS web interface but I can't get into any of the links on there.

    I'm getting exhausted by trying different ways that are suggested by the Internet. Could anyone give me a hint on whether this problem is caused by CUPS and the working principle of printing in Ubuntu?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    osx - Can't set up printing from Mac OS X (10.5.7) to an HP PSC 2410 shared from PC running Ubuntu 9.10
  • Weston C

    I've got an HP PSC 2410 printer shared from a fresh Ubuntu 9.10 installation. I'm able to send documents to this printer over the network from another Ubuntu machine. But so far, I haven't been able to find a setup where I can send documents to that printer from a MacBook running 10.5.7.

    On the Mac side, when setting things up, I go into System Prefs > Print & Fax, click on the "+" mark, select "IP", pick "IPP", enter the IP address of the Ubuntu box, leave the queue blank, enter the Name and location, and I think it's when I get to the "Print Using" (driver selection) part that I'm running into issues.

    If I use "Auto Select", it defaults to "Generic PostScript Printer", which I doubt the PSC 2410 is (and sure enough, if I print, the jobs don't go through).

    If I try "Select a driver to use...", there's not an option for an HP PSC 2400. This seems a little odd: I can plug the printer directly into one of our Macs and it immediately figures out the driver and I can print no problem, but that's apparently the way things work.

    So, that leaves one option: "Other", which, when selected, brings up a dialog apparently for the purpose of manually locating a driver. I've tried visiting HP's web site. They have drivers for earlier versions of Mac OS X, but state that after 10.4, Mac OS X should just come with the relevant drivers.

    I've also tried setting things up by interacting with the CUPS server on the Mac through a browser: I go to http://localhost:631/, select "Add New Printer", pick "Internet Printing Protocol (http)" for the Device selection, enter "http://ubuntu.machine.ip.address:631/printers/hp-psc-2400-series" for the Device URI, select "HP" for Make, and then on the next screen, we're back to the problem where the PSC 2400 just doesn't show up. There's an option to "provide a PPD file", which I assume would be the printer driver I can't find.

    A Google search for "HP PSC 2410 ppd Leopard" doesn't seem to yield much other than a reminder that the printer is supposed to just work out of the box on Leopard. A local search for ".ppd" or "2410" on either Mac also doesn't yield anything that looks like a relevant print driver.

    I'm totally stuck at this point. Any advice?


  • Related Answers
  • Peter Mortensen

    To follow up, I got a pointer to an answer in another forum:

    It turns out that Mac OS X 10.5 doesn't listen by default to CUPS broadcasts that advertise network printers running on other CUPS servers. So, on a terminal session at the Mac, just type

    cupsctl BrowseProtocols='"cups dnssd"'

    and then all printers will show up on the Add Printers dialog.

    (From http://forums.macrumors.com/showthread.php?t=677238#3.)

    I did this on the Macs on question and it worked like a charm: I typed in the cupsctl command, pulled up the Add Printers dialog, switched from IP to Default, and there it was. Mac OS X figured out the driver, and everything went smoothly.

    There's also some indication that it might be possible to use Bonjour on Ubuntu to make the CUPS-shared stuff visible, but I'm not clear on the details.