{"id":193,"date":"2020-09-26T13:19:45","date_gmt":"2020-09-26T13:19:45","guid":{"rendered":"https:\/\/dft.wiki\/?p=193"},"modified":"2021-02-07T20:22:21","modified_gmt":"2021-02-07T20:22:21","slug":"raspbian-print-server-with-cups","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=193","title":{"rendered":"Raspbian Print Server with  CUPS"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-359\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-39.png\" alt=\"\" \/><\/figure>\n<p>Give new life to old printers and keep your Raspberry Pi listening for print jobs while idle.<\/p>\n<p>All the modern printers are coming with integrated Wifi and\/or Ethernet adapters.<\/p>\n<p>Instead of buying a new printer, just create your own standalone network printer (wired and wireless) with a Raspberry Pi.<\/p>\n<p><strong>Installing CUPS<\/strong><\/p>\n<pre>sudo apt-get update<br \/>sudo apt-get upgrade<br \/>sudo apt-get install cups<br \/>sudo usermod -a -G lpadmin pi<br \/>sudo cupsctl \u2010\u2010remote-any<br \/>sudo service cups restart<\/pre>\n<p>Go tho the browser on the Pi and type:<\/p>\n<pre>http:\/\/127.0.0.1:631 OR http:\/\/localhost:631<\/pre>\n<p>Or from any other computer in the same network:<\/p>\n<pre>http:\/\/192.168.2.40:631 (remember to put your Pi's IP)<\/pre>\n<p>Find out the IP address of your Raspberry Pi:<\/p>\n<pre>hostname -I<\/pre>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-346\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-28.png\" alt=\"\" \/><\/figure>\n<p>Click on &#8216;<strong>Administration<\/strong>&#8216; on the top menu:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-349\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-31.png\" alt=\"\" \/><\/figure>\n<p>Click on &#8216;<strong>Add Printer<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-350\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-32.png\" alt=\"\" \/><\/figure>\n<p>You will be required to switch to an encrypted connection:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-351\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-33.png\" alt=\"\" \/><\/figure>\n<p>If your browser asks for confirmation, as Chrome does, click in &#8216;<strong>Advanced<\/strong>&#8216; and then on the link at the bottom &#8216;<strong>Proceed to &#8230;<\/strong>&#8216;<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-353\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-35.png\" alt=\"\" \/><\/figure>\n<p>Click again on &#8216;<strong>Add Printer<\/strong>&#8216; and authenticate with the user &#8216;<strong>pi<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-358\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-38.png\" alt=\"\" \/><\/figure>\n<p>All the printers attached to your Pi and already recognized will be shown on &#8216;<strong>Local Printers<\/strong>&#8216;, select the one you want to install, in my case is the &#8216;<strong>Samsung SCX-3200 Series<\/strong>&#8216;, and &#8216;<strong>Continue<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-361\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-40.png\" alt=\"\" \/><\/figure>\n<p>Inform the location &#8216;<strong>pi<\/strong>&#8216;, mark &#8216;<strong>Share This Printer<\/strong>&#8216;, and &#8216;<strong>Continue<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-363\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-42.png\" alt=\"\" \/><\/figure>\n<p>If you find the driver to your printer model o series, great! If not, go online and check which generic driver is compatible with your printer (for the vast majority of the printer there is one compatible driver). Select &#8216;<strong>Another Make\/Manufacturer<\/strong>&#8216;<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-364\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-43.png\" alt=\"\" \/><\/figure>\n<p>Select &#8216;<strong>Generic<\/strong>&#8216; and click &#8216;<strong>Continue<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-365\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-44.png\" alt=\"\" \/><\/figure>\n<p>For Samsung SCX-3200 the compatible driver is &#8216;<strong>Generic PCL 5e Printer<\/strong>&#8216;, and click on &#8216;<strong>Add Printer<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-366\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-45.png\" alt=\"\" \/><\/figure>\n<p>There are several configurations, but for now just click in &#8216;<strong>Set Default Options<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-367\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-46.png\" alt=\"\" \/><\/figure>\n<p>Printer added!<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-368\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-47.png\" alt=\"\" \/><\/figure>\n<p>In your Pi, open the text editor, and try to print something.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-369\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-48-1024x576.png\" alt=\"\" \/><\/figure>\n<p><strong>Installing SAMBA in Raspbian:<\/strong><\/p>\n<pre>sudo apt-get install samba<br \/>sudo nano \/etc\/samba\/samba.conf<\/pre>\n<p>Look for this configuration block. This will make all the CUPS printers available in the Windows network:<\/p>\n<pre># CUPS printing. <br \/>[printers]<br \/>comment = All Printers<br \/>browseable = yes<br \/>path = \/var\/spool\/samba<br \/>printable = yes<br \/>guest ok = yes<br \/>read only = yes<br \/>create mask = 0700<\/pre>\n<p>Make sure all the values are the same and the lines are not commented (remove anything from the beginning of the line).<\/p>\n<p>Restart the Samba service:<\/p>\n<pre>sudo systemctl restart smbd<br \/>sudo systemctl status smbd<br \/><br \/>OR<br \/><br \/>sudo service smbd restart<br \/>sudo service smbd status<\/pre>\n<h2><strong>How to print from any other computers on the network?<\/strong><\/h2>\n<ul class=\"is-style-default\">\n<li>From another Linux Desktop\n<ul>\n<li>The new network printer will be automatically detected and added, nothing has to be done, just print!<\/li>\n<\/ul>\n<\/li>\n<li>From Windows\n<ul>\n<li>Samba will allow the Pi to join the Windows network.<\/li>\n<\/ul>\n<ul>\n<li>Add the printer as using IPP (Internet Printing Protocol)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Adding printer using Samba in Windows 10:<\/strong><\/p>\n<p>Click &#8216;<strong>Start Menu<\/strong>&#8216; &gt; &#8216;<strong>Settings<\/strong>&#8216; &gt; &#8216;<strong>Devices<\/strong>&#8216; &gt; &#8216;<strong>Printers &amp; Scanners<\/strong>&#8216; &gt; &#8216;<strong>Add Printer or Scanner<\/strong>&#8216;.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-370\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-49.png\" alt=\"\" \/><\/figure>\n<p><strong>Adding printer using IPP in Windows 10:<\/strong><\/p>\n<p>Click &#8216;<strong>Start Menu<\/strong>&#8216; &gt; &#8216;<strong>Settings<\/strong>&#8216; &gt; &#8216;<strong>Devices<\/strong>&#8216; &gt; &#8216;<strong>Printers &amp; Scanners<\/strong>&#8216; &gt; &#8216;<strong>Add Printer or Scanner<\/strong>&#8216;.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-371\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-50.png\" alt=\"\" \/><\/figure>\n<p>Click on &#8216;<strong>The printer that I want isn&#8217;t listed<\/strong>&#8216; &gt; &#8216;<strong>Select a shared printer by name<\/strong>&#8216;.<\/p>\n<p>Type &#8216;<strong>http:\/\/192.168.2.40\/printers\/Samsung_SCX-3200_Series<\/strong>&#8216; where &#8216;<strong>192.168.2.40<\/strong>&#8216; must be replaced by the IP of your Pi and &#8216;<strong>Samsung_SCX-3200_Series<\/strong>&#8216; must be replaced by the name of your added printer:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-372\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-51.png\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-375\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-54.png\" alt=\"\" \/><\/figure>\n<p>In both cases, Samba or IPP it will require informing the Windows Driver of the printer.<\/p>\n<h2>How many printers can I share through the Pi?<\/h2>\n<p>You can connect several printers using USB hubs and all of them will be available at the same time, even multifunctional printers.<\/p>\n<h2>If my printer has a scanner, how can I scan?<\/h2>\n<p>The scanner will not be &#8216;shared&#8217; over the network but it can be used through VNC and share the scanned documents on the network.<\/p>\n<p>Enable VNC in the &#8216;<strong>Raspberry Pi Configuration<\/strong>&#8216;:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-379\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-58.png\" alt=\"\" \/><\/figure>\n<p>Install the &#8216;<strong>Simple Scan<\/strong>&#8216;:<\/p>\n<pre>sudo apt install simple-scan<\/pre>\n<p>Connect to your Pi via VNC:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-377\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-56.png\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-378\" src=\"hhttps:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/09\/image-57.png\" alt=\"\" \/><\/figure>\n<p>Just click in &#8216;<strong>Scan<\/strong>&#8216; as many pages you want to add in the same PDF file, and then &#8216;<strong>Save<\/strong>&#8216; on a shared folder.<\/p>\n<p><strong>That simple!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Give new life to old printers and keep your Raspberry Pi listening for print jobs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-193","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=193"}],"version-history":[{"count":13,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":1031,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions\/1031"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}