Archive

Posts Tagged ‘system-config-printer’

Configuring Printers Via The CUPS Web Interface

March 19th, 2009 2 comments

I setup the new office printer here on my laptop this morning and I had all kinds of trouble getting it to work with the system-config-printer graphical utility that I usually love so much.  As part of my troubleshooting I thought I’d try the web interface, which worked great!  That gave me the idea of sharing how to configure your printers over the default-installed, yet often unused, web interface.

CUPS, the Common Unix Printing System, comes with a web interface by default that many people don’t know about.  If you’d like to take a quick peek at it go ahead and open a new tab and visit http://localhost:631.  Did you know you can configure everything via the web interface that you might normally configure via the graphical interface?  Everything from creating and deleting printers, to printing test pages and assigning the default printer for the machine.

Now, for those of you that are suddenly worried about a service running on your machine that you were unaware of, CUPS only allows connections on the localhost interface by default.  In other words, if you tried accessing it over your public IP it would deny you access.  This means it would also deny access to anyone else trying to get in and manipulate your printers.

It is possible to make this interface open to more than just your localhost connection, just be sure you’re aware of the security implications first.  Anyone with access to that web management tool may be able to view, customize and possibly even delete your configured printers.

To allow access to the printer web interface simply edit the /etc/cups/cupsd.conf file and update the line reading:

Listen localhost:631

To:

Listen 0.0.0.0:631

You can, of course, replace 0.0.0.0 with a more specific IP address. Using 0.0.0.0 will listen on all available addresses the machine has.

In conclusion, configuring your printers is not limited to the graphical interface. CUPS has provided a web interface for some time now and its nearly as simple to use. The next time you have issues configuring or managing your printers, give the web interface a try!

Categories: Linux Tags: ,

Print Directly To PDF in Ubuntu 8.04

July 3rd, 2008 19 comments

In a release long, long ago and in a galaxy far, far away I blogged about how to configure Ubuntu to print directly to a .pdf file.  Looking back to this article it appears to be outdated an in need of some corrections.  This tutorial will outline how to use and, if needed, configure your Ubuntu 8.04 machine to print directly to a .pdf file.

Verifying Setup or Print to PDF Configuration

My Ubuntu 8.04 installation was already configured, out of the box, to print to .pdf.  This means, without any additional configuration I could select “Print” from an application and the output would be generated into a .pdf file and saved to disk.  You can verify whether or not your machine is configured the same way by Navigating to:

System > Administration > Printing

system-config-printer

If you already see a Local Printer listed as “PDF” then your machine is already configured as well.  If, for whatever reason, this is not the case for you this can be configured as follows.

  1. Install the cups-pdf package using: sudo aptitude install cups-pdf
  2. Select “New Printer”
  3. Select “Print into PDF file” with the device URI of “cups-pdf:/”
  4. Select “Generic”
  5. Select “PDF file generator”
  6. Assign a name.  “PDF” should be sufficient.
  7. Select “Apply”

pdf printer

Again, I would be surprised if this is not configured on your machine by default, but I never can tell what some of you have done to your machines ;)

Printing Directly to PDF

Once you have verified your machine is configured properly you should now be able to print documents directly to a .pdf file.  This should include text documents, web pages, etc.  Simply select “PDF” as the printer when you want to print a document.

After a print job has been sent you can find the generated .pdf file in your users Home folder within a new directory called “PDF”.

print to pdf resulting file

Categories: GNOME Tags: , ,