<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ikariw</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ikariw"/>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php/Special:Contributions/Ikariw"/>
		<updated>2026-05-05T09:43:12Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://www.freebsdwiki.net/index.php/CUPS</id>
		<title>CUPS</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php/CUPS"/>
				<updated>2009-05-21T21:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Ikariw: Updated warning about not using gnome to show how to adjust gnome to use CUPS.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CUPS (Common Unix Printing System)&lt;br /&gt;
This makes it easy to add printers to your system and programs such as firefox will pick up the printer list automatically.&lt;br /&gt;
&lt;br /&gt;
==Installing CUPS==&lt;br /&gt;
 # pkg_add -r cups&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 # cd /usr/ports/print/cups&lt;br /&gt;
 # make install clean&lt;br /&gt;
&lt;br /&gt;
The CUPS daemon can now be started.&lt;br /&gt;
&lt;br /&gt;
 # export cupsd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 # /usr/local/etc/rc.d/cupsd start&lt;br /&gt;
&lt;br /&gt;
If you want CUPS to start at boot time, as you probably do, add the line ''cupsd_enable=&amp;quot;YES&amp;quot;'' to /etc/rc.conf.&lt;br /&gt;
&lt;br /&gt;
Note that the port installed by sysinstall (for FreeBSD 6.2 at least) is cups-base and much fucntionality is missing so you may want to add the above port even if you installed cups when you installed FreeBSD. As well, cups-base (and perhaps cups) does not create a directory for CUPS log files. They can be very handy for debugging so create one this way:&lt;br /&gt;
&lt;br /&gt;
 # mkdir /var/log/cups&lt;br /&gt;
&lt;br /&gt;
==Install a Parallel Printer==&lt;br /&gt;
&lt;br /&gt;
If you use an old parallel printer then you need to do the following before you add the printer through cups:&lt;br /&gt;
&lt;br /&gt;
 # chown root:cups /dev/lpt0&lt;br /&gt;
 # chmod 0660 /dev/lpt0&lt;br /&gt;
&lt;br /&gt;
Now add these lines to /etc/devfs.conf so that the permissions are set during boot time&lt;br /&gt;
&lt;br /&gt;
 own    /dev/lpt0    root:cups&lt;br /&gt;
 perm   /dev/lpt0    0660&lt;br /&gt;
&lt;br /&gt;
Turn on your printer and let it boot up. You should also make sure that it is &amp;quot;On Line&amp;quot;. Now go back into the cups setup http://localhost:631 and add your printer, you will notice that there is now a Parallel device present.&lt;br /&gt;
&lt;br /&gt;
After installing a printer try printing a test page. If you are using a non-Postscript printer you may get the error:&lt;br /&gt;
&lt;br /&gt;
 Unsupported format 'application/postscript'&lt;br /&gt;
&lt;br /&gt;
In this case, add the port cups-pstoraster or the cups meta-port.&lt;br /&gt;
&lt;br /&gt;
 # pkg_add -r cups-pstoraster&lt;br /&gt;
 &lt;br /&gt;
 or&lt;br /&gt;
 &lt;br /&gt;
 # pkg_add -r cups&lt;br /&gt;
&lt;br /&gt;
Now open /usr/local/etc/cups/mime.convs in an editor as root and add or uncomment the line linking pstoraster to the mime type application/postscript.&lt;br /&gt;
&lt;br /&gt;
 application/vnd.cups-postscript application/vnd.cups-raster     100     pstoraster&lt;br /&gt;
&lt;br /&gt;
Restart the cups daemon&lt;br /&gt;
&lt;br /&gt;
 # /usr/local/etc/rc.d/cupsd restart&lt;br /&gt;
&lt;br /&gt;
and try to print a test page.&lt;br /&gt;
&lt;br /&gt;
==Installing a PCL printer==&lt;br /&gt;
&lt;br /&gt;
If you have a printer which handles PCL but not PS then you need to install the 'hpijs' port&lt;br /&gt;
&lt;br /&gt;
 # portinstall -P hpijs&lt;br /&gt;
&lt;br /&gt;
Now you will have a huge list of HP printers to select from, if you have a basic B&amp;amp;W laser printer which accepts PCL then use the 'HP LaserJet 5L Foomatic/hpijs' driver and you shouldn't have a problem.&lt;br /&gt;
&lt;br /&gt;
==Printing from Windows XP to a FreeBSD CUPs server==&lt;br /&gt;
You don't require samba to print from an XP client through a FreeBSD CUPs server to your printer.  It's easier to do this without samba actually.  It doesn't matter if you have samba installed though.&lt;br /&gt;
&lt;br /&gt;
Simply get your printers working under CUPs and on the local server and test these.  Then on the windows box add a new network printer and point that printer to your server by using the URL section of the wizard.&lt;br /&gt;
&lt;br /&gt;
For example &lt;br /&gt;
 http://&amp;lt;server&amp;gt;:631/printers/&amp;lt;printer name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will be able to have full rights of that printer on each windows box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==KDE Setup==&lt;br /&gt;
You can setup any non KDE applications such as Openoffice to use the KDE printer dialogue by setting up the default printer of that applications as:&lt;br /&gt;
&lt;br /&gt;
 kprinter -stdin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Openoffice===&lt;br /&gt;
Change the default printer in openoffice spadmin program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===xpdf===&lt;br /&gt;
&lt;br /&gt;
Add the following to /usr/X11R6/etc/xpdfrc config file.&lt;br /&gt;
 psFile                  &amp;quot;|kprinter -stdin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==CUPS to PDF==&lt;br /&gt;
CUPS can also be used to print directly from any program to a PDF file.&lt;br /&gt;
&lt;br /&gt;
 # pkg_add -r cups-pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CUPS mimics lpr==&lt;br /&gt;
If you have old programs which use lpr to print then you should install CUPS-lpr&lt;br /&gt;
 &lt;br /&gt;
 # pkg_add -r cups-lpr&lt;br /&gt;
&lt;br /&gt;
==CUPS Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
===CUPS with proxy===&lt;br /&gt;
Make sure if you run a proxy to set localhost in the exceptions of your browser.&lt;br /&gt;
Should now be able to connect to http://localhost:631&lt;br /&gt;
&lt;br /&gt;
===CUPS and KDE Error===&lt;br /&gt;
If you get an error in KDE print manager such as:&lt;br /&gt;
cups host not found.&lt;br /&gt;
&lt;br /&gt;
Then change the host from&lt;br /&gt;
host: /var/run/cups.sock&lt;br /&gt;
to&lt;br /&gt;
host: localhost&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CUPS and Gnome Warning===&lt;br /&gt;
In order to have CUPS work with Gnome applications and Firefox3, you will need to add 'WITH_CUPS=&amp;quot;YES&amp;quot;' to your /etc/make.conf and recompile libgnomeprint and gtk20.  You can do that with the commands:&lt;br /&gt;
 # echo 'WITH_CUPS=&amp;quot;YES&amp;quot;' &amp;gt;&amp;gt; /etc/make.conf&lt;br /&gt;
 # cd /usr/ports/print/libgnomeprint &amp;amp;&amp;amp; make deinstall &amp;amp;&amp;amp; make configure &amp;amp;&amp;amp; make install&lt;br /&gt;
 # cd /usr/ports/x11-toolkits/gtk20 &amp;amp;&amp;amp; make deinstall &amp;amp;&amp;amp; make configure &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Ikariw</name></author>	</entry>

	</feed>