Giter Site home page Giter Site logo

bergmn / cups-sharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benzea/cups-sharp

0.0 2.0 0.0 49 KB

Authentication support for Sharp MFP printers using Cups on Linux (GNOME)

Home Page: https://benjamin.sipsolutions.net/Projects/sharp-cups

Python 100.00%

cups-sharp's Introduction

Sharp authenticated printing for Cups
=====================================

This module allows linux users to print to sharp machines even with
authentication enabled. Sharp officially does not support this, but the
encryption was successfully reverse engineered and it is therefore possible
to implement it.

Content:
 * How it works
 * Bugs
 * Files
 * Dependencies
 * Installation
 * Security
 * Supporting other printers

How it works
============

The PPD adds PJL comments which are later modified by the filter to actually
set the required options.

The code in the filter is run as the last step and does the
encryption. This filter is also able to ask the user via dbus if this is
required. This method is provided because many applications are not able to
(properly) set Cups Custom options.

askpass-service is the dbus service that every user needs to run. An
askpass-service.desktop file to add to the autostart is provided.

Bugs
====

I don't know how sane it is to do dbus calls from a filter, it feels a bit
wrong. A better solution might be to implement this as a cups backend
instead.

Not all printer options may be working correctly with the PPD file.

It would be nice to hide unneeded authentication data easily. I tried to do
this using installed options, but the useless fields still show up in the
print dialog.

Files
=====

sharp-postprocess
 The cups filter.
askpass-service
 The dbus service that each user needs to run.
askpass-service.desktop
 Autostart file for the service.
sharp-askpass.conf
 DBus configuration required so that normal users can hold a name on the
 session bus.
Sharp MX-M753U.ppd
 PPD for the Sharp MX-M753U printer.

Dependencies
============

 * ConsoleKIT (for DBus rights management)
 * python DBus module (python-dbus in debian)
 * python Crypto module (python-crypto in debian)
 * PyGTK (python-gtk2 in debian)

Distribution Related
====================
Fedora >= 22
------------
 dnf install python-crypto
 dnf install pygtk2
 dnf install dbus-python

Installation
============

sharp-postprocess
 Copy into Cups filter direction, /usr/lib/cups/filter/ usually
askpass-service  
 Copy into users PATH, eg. /usr/local/bin
askpass-service.desktop
 Copy into autostart directory, /etc/xdg/autostart/ usually
sharp-askpass.conf
 Copy into the dbus system bus configuration.
 /etc/dbus-1/system.d/

NOTE: The sharp-askpass.conf file assumes that the printing pipeline
is run under the user "lp". This may be different on your system (eg.
arch linux uses the "daemon" user).
If it differes edit the file to change the username.

Then install the cups printer normally with the supplied PPD file.

Security
========

Please note:
 * Cups Custom options are passed over the command line. Any local user can
   read the plain text passwords easily in that case.
 * If the DBus method is used only the correct user should be asked for a
   password. Root can eavesdrop on the dbus connection.
 * The password encryption is two way, and can easily be undone.

Creating PPDs for printers
==========================

Please see PPD-README.

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.