Giter Site home page Giter Site logo

printing_kiosk's Introduction

Simple Printing Kiosk

A simple way to host a print webapp for a home or small business. Easier than configuring printers on ever-changing computers and simpler for guests to use too.

How it works

When a file is uploaded, the server calls the configured command on the path of the uploaded file (default command is lp, which adds the file to the CUPS queue)

Limitations

At this time, this has only been tested with one printer and on Linux and OS X. I have no idea how it would work on Windows, BSD, etc.

Prerequisites

  • Connect a printer to your server of choice
  • Install cups, such as: sudo apt install cups
  • Install requirements:
python3 -m venv ./venv/
source ./venv/bin/activate
pip install wheel
pip install -r requirements.txt

Manual deployment

source ./venv/bin/activate
mkdir -p data
python -c 'import secrets; print("SECRET_KEY = \"{}\"\n".format(secrets.token_hex(16)))' >> config.py
python3 ./run.py &
disown -h %

Deployment as systemd service

sudo cp printing_kiosk.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable printing_kiosk
sudo systemctl start printing_kiosk

Deployment as Docker container

Build Docker image and deploy a container locally:

docker build -t printing-kiosk:latest .
docker-compose up -d

Or build Docker image for arm64 and publish it in the registry:

docker buildx build --platform linux/arm64 -t printing-kiosk:latest .
docker tag printing-kiosk docker.local/printing-kiosk
docker login docker.local
docker push docker.local/printing-kiosk

Use http://127.0.0.1:1631 to configure your printer in CUPS.

Troubleshooting

Use /usr/lib/cups/backend/usb to ensure the printer is properly connected to CUPS:

/usr/lib/cups/backend/usb
DEBUG: list_devices 
DEBUG: libusb_get_device_list=13 
DEBUG2: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-2510 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/ML-2510%20Series?serial=3V61BKAQ411232V. 
direct usb://Samsung/ML-2510%20Series?serial=3V61BKAQ411232V. "Samsung ML-2510 Series" "Samsung ML-2510 Series" "MFG:Samsung;CMD:GDI;MDL:ML-2510 Series;CLS:PRINTER;STATUS:BUSY;" "" 

printing_kiosk's People

Contributors

biggerfisch avatar dmikushin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.