Skip to content

neutralvibes/pi-cups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi-CUPS

Docker based CUPS Printer server for Raspberry PI that supports the Samsung M2020 and others...

Introduction

I have a pretty reliable Samsung M2020 laser printer which is not wireless, without CUPS and Splix support. The Linux drivers provided by Samsung do not support Arm processors so they were also of no use.

After a lot of wasted time I finally managed to find some patches to Splix @ https://gitlab.com/ScumCoder/Splix/tree/patches/Splix that included the required drivers plus some.

This docker container:-

  • Installs CUPS
  • printer-driver-all
  • printer-driver-cups-pdf
  • openprinting-ppds
  • Enables remote access
  • Builds the Splix patches
  • Installs the Splix patches
  • Persists the configuration
  • Serves the new driver files for download @ http://host:8631

Installation

git clone https://github.com/neutralvibes/pi-cups.git && cd pi-cups && chmod +x *.sh

If cups is already installed on your system you will need to stop and disable it otherwise the next step will fail. It doesn't hurt to do this if you are not sure.

sudo systemctl stop cups-browsed
sudo systemctl disable cups-browsed
sudo systemctl stop cups
sudo systemctl disable cups

Usage

On the very first run it will take a while as it builds the image. CUPS has a ton of requirements so having a cup of tea and a slice of cake while it completes is recommended. On a Raspberry pi 3B it took circa 30 mins.

Starting

docker-compose up -d

Or if your user hasn't been added to the docker group:

sudo docker-compose up -d

You should now be able to connect to CUPS @ http://hostname:631

Admin credentials

Cups admin user & password are both 'print'

Using drivers

Remember, this is usually for those drivers not already available in CUPS, so see if it's not there already first.

In-order to setup a printer using one of the patched drivers you have to surf to http://hostname:8631 and download the ppd driver file for your model of printer.

In CUPS go to:-

  • Administration -> [Add Printer]
  • Select Samsung M2020 Series (or the printer required) -> [Continue]
  • Make any changes required -> [Continue]
  • [Choose File]
  • Select the driver file you previously downloaded.
  • Click [Add Printer]

Backups

  • Location -> data/backups/config.tar

The CUPS data is stored on a docker volume for persistent storage. If the need arises, you can create or restore from a tar backup. This creates a copy of the /etc/cups folder.

Create

sudo ./backup.sh

Restore

A confirmation prompt is shown when restoring.

sudo ./restore.sh

To do

[ ] The container runs in privileged mode 😱, fix this.


Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published