<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jurassic</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jurassic"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Jurassic"/>
	<updated>2026-04-30T19:35:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Printer_Setup&amp;diff=15612</id>
		<title>Printer Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Printer_Setup&amp;diff=15612"/>
		<updated>2018-12-21T12:40:46Z</updated>

		<summary type="html">&lt;p&gt;Jurassic: Mention IPP everywhere&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, you&#039;ll need [https://en.wikipedia.org/wiki/CUPS CUPS]. If you have a &#039;&#039;Hewlett-Packard&#039;&#039; printer (&#039;&#039;HP&#039;&#039; brand), add the [https://en.wikipedia.org/wiki/HP_Linux_Imaging_and_Printing HPLIP] package.&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add cups cups-libs cups-pdf cups-client cups-filters hplip}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|As with all installation processes, Alpine&#039;s [[Alpine_Linux_package_management|package management]] can guide you on the need to pull various packages from other repositories (e.g.&#039;&#039;@testing&#039;&#039;) other than the enabled &#039;&#039;main&#039;&#039; or &#039;&#039;edge&#039;&#039; repositories throughout this wiki page, as long as these other repos have been [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning pinned].  For example, for Alpine version 3.7.0 on x86_64 systems, &#039;&#039;&#039;apk&#039;&#039;&#039; would have then guided you to substitute in &amp;lt;code&amp;gt;cups-pdf@testing&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hplip@testing&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
Then go to http://localhost:631 with your web browser and follow the steps to &amp;quot;Add Printer&amp;quot;. It will ask you to log in to add a printer. Log in as root, then finish the steps. Once you&#039;re done, you should be able to print.&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t work, you may also need to add HPLIP&#039;s dependencies separately. There are currently no packages for &#039;&#039;&#039;CUPS DDK&#039;&#039;&#039;, &amp;lt;code&amp;gt;hp-setup&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;foomatic&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{cmd|# apk add libusb ghostscript qt py-qt python3 py-reportlab libjpeg libjpeg-turbo net-snmp}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Expand|Modifications/sections required e.g. to address container user-case scenarios, etc.}} &lt;br /&gt;
&lt;br /&gt;
== Desktop Environment ==&lt;br /&gt;
Additionally, in a desktop environment you could proceed as follows.&lt;br /&gt;
&lt;br /&gt;
Check whether &#039;&#039;root&#039;&#039; and the user&#039;s username (&#039;&#039;yourusername&#039;&#039;) are already members of the &amp;lt;code&amp;gt;lp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lpadmin&amp;lt;/code&amp;gt; groups.  Note:  &#039;&#039;yourusername&#039;&#039; can be added to the &amp;lt;code&amp;gt;lpadmin&amp;lt;/code&amp;gt; group if he/she will administer the CUPS system.&lt;br /&gt;
 $ id root&lt;br /&gt;
 uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)&lt;br /&gt;
 $ id &#039;&#039;yourusername&#039;&#039;&lt;br /&gt;
 uid=1000(yourusername) gid=1000(yourusername) groups=1000(yourusername),6(disk),10(wheel),18(audio),19(cdrom),20(dialout),27(video),100(users),1001(plugdev)&lt;br /&gt;
&lt;br /&gt;
If not, add them:&lt;br /&gt;
 $ sudo adduser root lp&lt;br /&gt;
 $ sudo adduser root lpadmin&lt;br /&gt;
 $ sudo adduser &#039;&#039;yourusername&#039;&#039; lp&lt;br /&gt;
 $ sudo adduser &#039;&#039;yourusername&#039;&#039; lpadmin&lt;br /&gt;
&lt;br /&gt;
Start CUPS (&#039;&#039;&#039;cupsd&#039;&#039;&#039;) and make it persist between boots;  then reboot:&lt;br /&gt;
 $ sudo rc-service cupsd start&lt;br /&gt;
 $ sudo rc-update add cupsd&lt;br /&gt;
 $ sudo reboot&lt;br /&gt;
&lt;br /&gt;
Credit to ArchWiki&#039;s excellent [https://wiki.archlinux.org/index.php/CUPS CUPS] page for guidance with the following basic steps.&lt;br /&gt;
&#039;&#039;&#039; Locate your printer &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With your printer connected and powered on, determine the &#039;&#039;URI&#039;&#039; for your printer.  Depending on whether the connection is via &#039;&#039;&#039;usb&#039;&#039;&#039; or &#039;&#039;&#039;parallel&#039;&#039;&#039; ports, the URI will carry a &amp;lt;code&amp;gt;usb://&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;parallel:/&amp;lt;/code&amp;gt; prefix.&lt;br /&gt;
&lt;br /&gt;
 $ lpinfo -v #&lt;br /&gt;
 network lpd&lt;br /&gt;
 network socket&lt;br /&gt;
 network beh&lt;br /&gt;
 file cups-brf:/&lt;br /&gt;
 direct usb://HP/LaserJet%202200&lt;br /&gt;
 network ipp&lt;br /&gt;
 network ipps&lt;br /&gt;
 network https&lt;br /&gt;
 network http&lt;br /&gt;
 direct hp&lt;br /&gt;
&lt;br /&gt;
In the example above, the URI is &amp;lt;code&amp;gt;usb://HP/LaserJet%202200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Find a .ppd or .ppd.gz &#039;&#039;driver&#039;&#039;. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If your printer supports &#039;&#039;IPP Everywhere&#039;&#039; --most recent models do-- see the &#039;&#039;driverless&#039;&#039; command in &#039;&#039;cups-filters&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 $ driverless ipp_uri &amp;gt; printer.ppd&lt;br /&gt;
&lt;br /&gt;
or just pass &#039;&#039;-m everywhere&#039;&#039; to &#039;&#039;lpadmin&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
Otherwise, you could list all the drivers available by running &amp;lt;code&amp;gt;lpinfo -m&amp;lt;/code&amp;gt; and then searching through the results to find a .ppd or .ppd.gz specific to your printer.  A quick solution is to use the &amp;lt;code&amp;gt;--make-and-model&amp;lt;/code&amp;gt; flag and the &amp;lt;code&amp;gt;grep&amp;lt;/code&amp;gt; function in order to filter the results by plugging in your printer&#039;s make, model and series in this fashion:&lt;br /&gt;
&lt;br /&gt;
 $ lpinfo --make-and-model &amp;quot;&#039;&#039;make_and_model_names&#039;&#039;&amp;quot; -m | grep -i &#039;&#039;printer_series&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Tip|&lt;br /&gt;
*Search for the term &#039;&#039;HP&#039;&#039; to find instances of &#039;&#039;Hewlett-Packard&#039;&#039;.&lt;br /&gt;
*You do not need to state the &amp;lt;code&amp;gt;printer_series&amp;lt;/code&amp;gt; in whole if at all e.g. &#039;&#039;2200&#039;&#039; may be preferable to searching for &#039;&#039;2200M&#039;&#039;, etc.}}&lt;br /&gt;
&lt;br /&gt;
For example, type:&lt;br /&gt;
&lt;br /&gt;
 $ lpinfo --make-and-model &amp;quot;HP LaserJet&amp;quot; -m | grep -i 2200&lt;br /&gt;
&lt;br /&gt;
Out of the results obtained, you might select the following .ppd &#039;&#039;driver&#039;&#039;:&lt;br /&gt;
 drv:///hp/hpcups.drv/hp-laserjet_2200_series.ppd&lt;br /&gt;
&lt;br /&gt;
If required, further drivers can be obtained by installing [http://gimp-print.sourceforge.net/ gutenprint], and running the &amp;lt;code&amp;gt;lpinfo&amp;lt;/code&amp;gt; search again.  These may not specify .ppd names.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apk add gutenprint gutenprint-doc&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Configure a queue &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a queue using a &#039;&#039;queue_name&#039;&#039; of your choice.  Your selected printer&#039;s name is an obvious choice, but do not employ spaces.  You will also need to be root or use &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; instead, and you will also need to plug in the &#039;&#039;URI&#039;&#039; and the .ppd &#039;&#039;driver&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 # lpadmin -p &#039;&#039;queue_name&#039;&#039; -E -v &amp;quot;&#039;&#039;uri&#039;&#039;&amp;quot; -m &#039;&#039;driver&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this example, you could set as follows, but there are other solutions.&lt;br /&gt;
&lt;br /&gt;
 # lpadmin -p HP_LaserJet_2200 -E -v &amp;quot;usb://HP/LaserJet%202200&amp;quot; -m drv:///hp/hpcups.drv/hp-laserjet_2200-pcl3.ppd&lt;br /&gt;
&lt;br /&gt;
This printer queue could be set as &#039;&#039;&#039;default&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 # lpoptions -d HP_LaserJet_2200&lt;br /&gt;
&lt;br /&gt;
Printer settings can typically be set in your GUI application&#039;s &#039;&#039;&#039;Print&#039;&#039;&#039; menu or by examining the CUPS [https://www.cups.org/doc/man-lpoptions.html lpoptions] page.  If you have a single queue, the setting options available (such as page type, duplex, etc.) for your queue can simply be &#039;&#039;&#039;listed&#039;&#039;&#039; by using the &#039;&#039;&#039;-l&#039;&#039;&#039; flag.  Asterisks(*) indicate current settings:&lt;br /&gt;
&lt;br /&gt;
 # lpoptions -l&lt;br /&gt;
 PageSize/Media Size: Card3x5 Hagaki Photo4x6 A6 Photo5x7 Card5x8 Oufuku A5 B5 JB5 Executive 16k Letter *A4 ExecutiveJIS FLSA Legal EnvA2 EnvC6 EnvChou4 EnvMonarch EnvDL Env10 EnvChou3 EnvC5 EnvB5 Custom.WIDTHxHEIGHT&lt;br /&gt;
 Duplex/Double-Sided Printing: DuplexNoTumble DuplexTumble *None&lt;br /&gt;
 InputSlot/Media Source: *Auto PhotoTray Upper Lower Envelope LargeCapacity Manual MPTray&lt;br /&gt;
 ColorModel/Output Mode: *Gray&lt;br /&gt;
 MediaType/Media Type: *Plain&lt;br /&gt;
 OutputMode/Print Quality: *Normal Draft Best&lt;br /&gt;
 OptionDuplex/Duplexer Installed: *False True&lt;br /&gt;
&lt;br /&gt;
If there is only one queue, &#039;&#039;&#039;options&#039;&#039;&#039; can be set by simply using &#039;&#039;&#039;-o&#039;&#039;&#039; flags for each setting:&lt;br /&gt;
&lt;br /&gt;
 # lpoptions -o PageSize=Legal -o Duplex=DuplexNoTumble&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.cups.org/documentation.html CUPS documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:Printers]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Jurassic</name></author>
	</entry>
</feed>