Difference between revisions of "Brother HL-2140"

From ArchWiki
Jump to: navigation, search
m (Start CUPS)
m (Add printer)
Line 18: Line 18:
  
 
==Add printer==
 
==Add printer==
If you haven't already, connect the printer to your computer. Next, get the address of the printer by running:
+
If you haven't already, connect the printer to your computer. Next, get the address of the printer:
  
 
{{ic|# lpinfo -v}}
 
{{ic|# lpinfo -v}}
Line 24: Line 24:
 
If you are using a direct USB connection, look for the line beginning with {{ic|direct usb://}}. Next add the printer. The name is up to you.
 
If you are using a direct USB connection, look for the line beginning with {{ic|direct usb://}}. Next add the printer. The name is up to you.
  
{{ic|lpadmin -E -p <name> -v <address> -P </path/to/ppd_file>}}
+
{{ic|# lpadmin -E -p <name> -v <address> -P </path/to/ppd_file>}}
  
 
Check that the printer was added successfully:
 
Check that the printer was added successfully:
  
{{ic|lpstat  -p}}
+
{{ic|$ lpstat  -p}}
  
 
Print a test file:
 
Print a test file:
  
{{ic|lpr -P <name> </path/to/file>}}
+
{{ic|$ lpr -P <name> </path/to/file>}}
  
 
If you want, make the printer the default:
 
If you want, make the printer the default:
  
{{ic|lpoptions -d <name>}}
+
{{ic|# lpoptions -d <name>}}
  
 
See the article on [[CUPS]] for more in-depth instructions.
 
See the article on [[CUPS]] for more in-depth instructions.

Revision as of 09:38, 31 October 2013

The Brother HL-2140 is a greyscale laser printer. It is compatible with CUPS on Arch Linux, using the hplip driver collection.

Install packages

Install cups and hplip. If you have previously installed printing-related packages, you may want to remove them and any other configurations or modifications you've applied.

Download PPD

Download the necessary PPD from OpenPrinting's HL-2140 page (direct link).

Start CUPS

If it is not already running, start CUPS:

# systemctl start cups.service

If you want CUPS to be enabled on startup, enable it:

# systemctl enable cups.service

Add printer

If you haven't already, connect the printer to your computer. Next, get the address of the printer:

# lpinfo -v

If you are using a direct USB connection, look for the line beginning with direct usb://. Next add the printer. The name is up to you.

# lpadmin -E -p <name> -v <address> -P </path/to/ppd_file>

Check that the printer was added successfully:

$ lpstat -p

Print a test file:

$ lpr -P <name> </path/to/file>

If you want, make the printer the default:

# lpoptions -d <name>

See the article on CUPS for more in-depth instructions.