<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: kprinter</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/kprinter/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Howto | Configure Iceweasel to print via Kprinter</title>
      <link>https://chrisjrob.com/2009/03/21/configure-iceweasel-to-print-via-kprinter/</link>
      <pubDate>Sat, 21 Mar 2009 05:56:39 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/configure-iceweasel-to-print-via-kprinter</guid>
      <description>
       <![CDATA[
         
         <h2 id="introduction">Introduction</h2>

<p>Iceweasel and Firefox do not use the KDE Print system, but instead print directly to CUPs.  This works fine, but can be confusing, as it looks different and doesn’t offer all the same functions, like PDF etc.</p>

<p>Trying to resolve this issue, I came across this posting:</p>

<ul>
  <li><a href="http://ubuntuforums.org/showthread.php?t=205050">How To: Make Firefox / Thunderbird print to kprinter automatically in KDE / Kubuntu</a> by msak007</li>
</ul>

<!--more-->

<h2 id="single-user">Single User</h2>

<h3 id="step-1-print-to-postscript">Step 1 Print to Postscript</h3>

<p>First, if you haven’t done so, you need to print to PostScript in order for the needed entry in <code class="language-plaintext highlighter-rouge">prefs.js</code> to be populated. This will be done automatically the first time you print. Open any web page and go to:</p>

<p>File → Print → choose PostScript/default (it should be the default if you haven’t installed any printers yet) → click “Print”</p>

<p>Once you have done this and it prints, it’ll add the PostScript entry you need to edit.</p>

<h3 id="step-2-change-default-postscript-printer">Step 2 Change default postscript printer</h3>

<p>In the URL bar, open the config by typing:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>about:config
</code></pre></div></div>

<p>In the “Filter” bar, type</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>print.printer_PostScript/default.print_command
</code></pre></div></div>

<p>This should filter everything out but that line.</p>

<p>Right-click on the line, click on “Modify”, and change the entry from:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>lpr ${MOZ_PRINTER_NAME:+-P"$MOZ_PRINTER_NAME"}
</code></pre></div></div>

<p>to:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>kprinter
</code></pre></div></div>

<p>Then click OK. This will make Iceweasek print to kprinter any time you select the “PostScript/default” printer.</p>

<h3 id="step-3-set-it-to-print-automatically">Step 3 Set it to print automatically</h3>

<p>Right-click anywhere in the white space, then click on “New → Boolean” to add a new Boolean entry. Type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>print.always_print_silent
</code></pre></div></div>

<p>And set its value to “true”. This will force Iceweasel to print to the default printer without prompting you.</p>

<h3 id="step-4-disable-cups">Step 4 Disable CUPs</h3>

<p>If “PostScript/default” is the only printer you have and there are no local / network printers, it works great and you can stop here. But if you installed a printer through CUPS, it complicates things as Iceweasel will want to use that as a default and all your prints will go there without prompting you! So even if you don’t have a local printer, it’s a good idea to add the following line in case you add one later.</p>

<p>Once again, right-click and choose “New → Boolean”. Type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>print.postscript.cups.enabled
</code></pre></div></div>

<p>And set its value to “false”. That will disable CUPS printing in Iceweasel, and it will default to the “PostScript/default” printer. And since you’ve changed the output of that to kprinter, you’ll see a “processing” dialog for a split second when you print, after which kprinter will open up. There you can choose all your printers, including PDF, PostScript, and any CUPS installed printers.</p>

<h2 id="multi-user">Multi-user</h2>

<p>There is a file that controls global settings, but it’s not <code class="language-plaintext highlighter-rouge">prefs.js</code> - it’s called (ironically) <code class="language-plaintext highlighter-rouge">firefox.js</code>, and is located in:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/usr/share/iceweasel/defaults/pref
</code></pre></div></div>

<p>Make sure you have Firefox closed and edit the file using your favorite editor.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd /usr/share/iceweasel/defaults/pref/
$ sudo cp firefox.js firefox.js.backup
$ kdesu kate firefox.js
</code></pre></div></div>

<p>Enter your password, and when Kate opens up add the following to the very end of the file:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// Print to kprinter by default for all users
pref("print.postscript.print_command", "kprinter");
pref("print.print_command", "kprinter");
pref("print.always_print_silent", true);
pref("print.postscript.cups.enabled", false);
</code></pre></div></div>

<p>Save the file and launch Firefox. This will not overwrite or modify and user set entries (the entries in bold in about:config), so it will only affect new profiles. If you’ve already modified your profile, this will not change any of the settings in it.</p>

       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
