thecore_print_commons 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -0
- data/app/workers/print_worker.rb +1 -1
- data/lib/thecore_print_commons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4c926689a8f257f2b336b1d078630adaa7e391
|
4
|
+
data.tar.gz: 28ba64ba6858a3293d9d1561a4c662628ab95d40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 484ab705254babd17265d0e097f30f9e33a0bb9c6e7500cc47811b5902e262cd31472e458e01d9184cf39393a15b8654d9c56d993cf108b0b321f09470381b56
|
7
|
+
data.tar.gz: 86a92d189f2a3e3a4d56ad084b6c3683b9aabc2a4b3bd3c9814233c619d2f4f8a6d3ed2904f705abb6c5a3803d80cb41aed16a4ef255e684ad47cf1696c1639e
|
data/README.md
CHANGED
@@ -8,6 +8,41 @@ the authentications needed for adding printers, to do so, please edit /etc/cups/
|
|
8
8
|
|
9
9
|
When you enter the printers section and add a new printer in Thecore backend, you'll just see available (through cups) printers and you can just select one of these.
|
10
10
|
|
11
|
+
Otherwise, if you prefere to go the shell way, you can add it using lpadmin, say you'd like to install a samba printer:
|
12
|
+
|
13
|
+
First of all add current user to lpadmin group:
|
14
|
+
|
15
|
+
```shell
|
16
|
+
sudo apt install cups libcups2-dev gridsite-clients smbclient
|
17
|
+
sudo adduser $(whoami) lpadmin
|
18
|
+
newgrp lpadmin
|
19
|
+
```
|
20
|
+
|
21
|
+
Then you can use lpadmin commands without sudo (example for samba shared printer, must be adapted for other protocols):
|
22
|
+
|
23
|
+
```shell
|
24
|
+
echo "Printer label:"; read PRINTERLABEL;
|
25
|
+
echo "Printer workgroup or Domain:";read WORKGROUP;
|
26
|
+
echo "Printer ip or netbios address:";read SHARE_IP_ADDRESS_OR_NETBIOS_NAME;
|
27
|
+
echo "Printer share name:";read SHARENAME;
|
28
|
+
echo "Printer share username:"; read USERNAME;
|
29
|
+
echo "Printer share password:"; read PASSWORD;
|
30
|
+
lpadmin -p "$PRINTERLABEL" -E -v "smb://$(urlencode $USERNAME):$(urlencode $PASSWORD)@$(urlencode $WORKGROUP)/$(urlencode $SHARE_IP_ADDRESS_OR_NETBIOS_NAME)/$(urlencode $SHARENAME)" -m everywhere
|
31
|
+
```
|
32
|
+
|
33
|
+
To list shares on that remote machine:
|
34
|
+
|
35
|
+
```shell
|
36
|
+
smbclient -L $(urlencode $SHARE_IP_ADDRESS_OR_NETBIOS_NAME) -U $(urlencode $USERNAME)%$(urlencode $PASSWORD) -W $(urlencode $WORKGROUP)
|
37
|
+
```
|
38
|
+
|
39
|
+
To test from shell, prior to start using the rails ui:
|
40
|
+
|
41
|
+
```shell
|
42
|
+
echo "Hello" > testprint
|
43
|
+
lp -d "$PRINTERLABEL" -o raw testprint
|
44
|
+
```
|
45
|
+
|
11
46
|
## Installation
|
12
47
|
First of all, please install libcups2-dev:
|
13
48
|
|
data/app/workers/print_worker.rb
CHANGED