13 August 2021

Raspberry Pi 4 Print Server: Part 3

Time for the final setup steps

General Setup

Changing the hostname:

  • hostnamectl set-hostname <new hostname>
Broadcasting the hostname:
  • sudo apt install samba
  • sudo apt install libnss-winbind
  • install wsdd
    • git clone
    • group: nogroup
    • /usr/local/bin/wsdd
    • cp etc/systemd/wsdd.service /etc/systemd/system/
    • sudo systemctl daemon-reload
    • sudo systemctl enable wsdd
    • sudo systemctl status wsdd
Controlling the fan and Power button:


Printer Setup

Installing CUPS and Printer Drivers for SCX-4623f

Unfortunately CUPS requires a user/pass combination and the default is for root, so I set a password for root
  • Run this on the Raspberry Pi:
    • sudo su -
    • passwd
Forward the CUPS UI to your laptop
  • Run this on your laptop
    • ssh -L 6631:localhost:631 ubuntu@192.168.1.XX
You can now open a browser and go to http://localhost:6631 on your laptop for adding the printer and checking "Share printers connected to this system" on the "Administration" tab. For the user use "root" and use the password that you set above. Optionally, you can check "Allow remote administration" to skip the ssh command in the future and go directly to http://192.168.1.XX:631

You should now be able to see the printer on your network!

Scanner Setup

Raspberry Pi Setup

  • Install sane
    • sudo apt install sane
  • Check for the scanner
    • sudo sane-find-scanner
    • sudo scanimage -L
    • cd /tmp
    • sudo -u saned scanimage -x 100 -y 100 -d xerox_mfp:libusb:XXX:XXX --format=png -p > image.png
    • if you hear it scanning than it works and proceed, if not add saned user to lp group and try again
      • sudo usermod -a -G lp saned
  • Have saned listen to local network
    • edit /etc/sane.d/net.conf
      • add the local network (eg. 192.168.1.0/24)
  • Configure saned socket to load (you do not need the saned service itself)
    • sudo systemctl start saned.socket
    • sudo systemctl enable saned.socket

Laptop Setup

  • install xsane
    • sudo apt install xsane
  • edit /etc/sane.d/net.conf
    • add the ip address of the Raspberry Pi (eg 192.168.1.XX)
Start xsane and happy scanning!

No comments:

Post a Comment