Changes
Page history
torstenn created page: print via samba
authored
Jan 24, 2017
by
Torsten Nielsen
Show whitespace changes
Inline
Side-by-side
print-via-samba.md
View page @
a0d8afbc
...
@@ -41,4 +41,57 @@ Now you can print using the script like this:
...
@@ -41,4 +41,57 @@ Now you can print using the script like this:
$ mylpr 5123-300-c-2 golfer.ps
$ mylpr 5123-300-c-2 golfer.ps
```
```
##
## Method 2 - Add a printer to CUPS
\ No newline at end of file
This method requires a running version of CUPS on a personal computer,
where you alone have root access.
Insert the following entry into
`/etc/cups/printers.conf`
for the printer
`5123-300-c-2`
:
```
<Printer 5123-300-c-2>
Info
Location 5123-300
MakeModel
DeviceURI smb://<username>:<password>@uni/print.uni.au.dk:139/5123-300-c-2
State Idle
StateTime 1479952801
Type 8400916
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
```
Remember to put the correct values for
`<username>:<password>`
!
Reload the CUPS configuration using the command:
```
# sudo systemctl reload cups
```
Take care that no one but you have access to the
`printers.conf`
file,
so your login-credentials won't be exposed.
PPD files describe the capabilities of the printer to CUPS so if you want
to use any fancy features it's best to have a good PPD-file configured.
The PPD files goes in the folder:
`/etc/cups/ppd`
. If the of the PPD file is
`xrx720.ppd`
, then create a link like this:
```
# cd /etc/cups/ppd
# ln -s ./xrx7120.ppd 5123-300-c-2.ppd
```
The same physical PPD file can be linked to from as many printers as required.
There are other ways to create printers and link a PPD file:
*
Web-interface
`http://localhost:631`
*
GUI-interface