-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
109 lines (86 loc) · 3.02 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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.