CUPS notes
- March 26th, 2014
- Write comment
OS: Ubuntu 12.04 LTS
I decided it was about time to solve a couple issues that seem to constantly come up for me when it comes to using CUPS in linux for printing.
The first was getting access to the configuration page from a machine other than the console. To do this you have to modify the /etc/cups/cupsd.conf file.
…
# JGZ – 3/26/2014 – To listen on the eth0 interface
Listen 10.10.10.9:631
…
# Restrict access to the server
Order allow,deny
# JGZ – 3/26/2014 – To allow access to /
Allow all
# Restrict access to the admin pages
Order allow,deny
# JGZ – 3/26/2014 – To allow access to /admin
Allow all
# Restrict access to configuration files
AuthType Default
Require user @SYSTEM
Order allow,deny
# JGZ – 3/26/2014 – To allow access to /admin/conf
Allow all
…
After the changes are made to the /etc/cups/cupsd.conf file, you need to restart cups:
# service cups restart
The next issue I had is the default size of the font. I frequently print files I create in vi or configuration files or scripts, and the font is too big by default to make the document readable. For this, I added the following to the printers.conf file in /etc/cups.
…
# JGZ – 3/26/2014 – decrease default font size
Option cpi 15.000000
Option lpi 9.000000
…
I put this un the ErrorPolicy line in between the
Note: To set the margins while printing a text file, you specify the options in the lp command line:
lp -d myprinter -o page-top=18 -o page-bottom=18 -o page-left=18 -o page-right=18 mytextfile
The options are in points (72 points are in an inch). Eighteen points would be a quarter of inch margin.