Friday, February 8, 2013

CUPS: Usage

Some basic commands that enable us to print and maintain our CUPS server and printers

  • lpq -a - Shows the queued jobs for all printers.
  • lpq -Pprintername - Shows the queued jobs for a specific printer.
  • lprm X - Deletes a specific print job.
  • lprm - - Deletes all print jobs.
  • lpr - Send a file to printer.
  • lpr -Pprintername - Send a file to a non default printer.
  • lpc status all - Shows the state of the printers.
  • lpmove # printer - Move a specific job to an other printer
  • lpmove printer1 printer2 - Move all jobs from one printer to an other.
  • cupsaccept - Enable the printing queue.
  • cupsreject - Disable the printing queue.
  • cupsenable - Enable the printer.
  • cupsdisable - Disable the printer, will still send to queue.
  • cupsdisable -r XXXX - Disable the printer with a reason.
Dennis.

Thursday, February 7, 2013

CUPS: 426 Upgrade Required

After installing cups on my CentOS server, I noticed that when trying to add a printer I encountered an error that said "426 Upgrade Required".

As you'll probably notice, the new address that is supplied for you contains https://, incase you don't want to use SSL certification you can disable it by adding a line to /etc/cups/cupsd.conf :
DefaultEncryption Never

Dennis.

CUPS: Web GUI

In order to access cups web GUI from an other computer, there is a need to edit /etc/cups/cupsd.conf:


# Only listen for connections from the local machine.
Listen localhost:631 # You can configure wich interface to listen to
Listen /var/run/cups/cups.sock

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow 192.168.1.0/24 # Add this line and specify your network/hostname or ip.
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow 192.168.1.0/24 # Add this line and specify your network/hostname or ip.
</Location>


Dennis.

Tuesday, February 5, 2013

Vim Enhancement

In order to make our code or configuration files more readable, we can color and number the lines and the syntax by doing the following :
1. Open your terminal window
2. Create a file named .vimrc in your home folder
3. In the file add the following lines
syntax on
set number
4. Done !

Dennis.