在64位Debian计算机上使用CUPS设置Brother HL-4150CDN打印机

时间:2020-03-21 11:47:03  来源:igfitidea点击:

今天的计划是在Debian Wheezy机器上安装通用Unix打印系统,并将其配置为与Brother HL-4150CDN网络打印机一起使用。

安装CUPS和打印机驱动程序

我们正在使用64位Debian Wheezy。
CUPS是通用Unix打印系统,它是在后台运行的守护程序,等待提交打印作业。
CUPS是高度面向网络的。

安装CUPS。
并不是说,如果我们不是以root身份运行,则需要将sudo添加到两个apt-get命令中:

# apt-get update && apt-get install --no-install-recommends cups

安装所需的过渡软件包,以将ia32-lib迁移到多体系结构:

# apt-get install ia32-libs

下载LPR和cupswrapper驱动程序:

$wget http://download.brother.com/welcome/dlf005940/hl4150cdnlpr-1.1.1-5.i386.deb
$wget http://download.brother.com/welcome/dlf005942/hl4150cdncupswrapper-1.1.1-5.i386.deb

MD5哈希:

$md5sum hl4150cdnlpr-1.1.1-5.i386.deb hl4150cdncupswrapper-1.1.1-5.i386.deb
dd803993d4a29a432d63141201621b82  hl4150cdnlpr-1.1.1-5.i386.deb
81c3abd6b831f90301ed9117b28f291e  hl4150cdncupswrapper-1.1.1-5.i386.deb

安装LPR和cupswrapper驱动程序:

# dpkg -i --force-all hl4150cdnlpr-1.1.1-5.i386.deb
# dpkg -i --force-all hl4150cdncupswrapper-1.1.1-5.i386.deb

打印机配置

CUPS IPP打印系统与Web上使用的HTTP密切相关。
由于我们的打印机已连接到LAN(而不是通过USB电缆),因此我们可以打开Web浏览器并导航到“ http://localhost:631/printers /”进行配置。

单击打印机名称,然后选择“修改打印机”,当我们进入管理面板时,可能会要求输入用户名和密码,这是我们的根用户凭据。

我们需要为其他网络设备选择“ LPD/LPR主机或者打印机”。

修改连接字符串,使其看起来像“ lpd://<printer_IP>)/binary_p1.

添加描述和位置。

使用当前驱动程序。

单击“修改打印机”按钮完成操作,尝试打印某些内容,打印机的状态应从“空闲”更改为“正在处理”。

编辑CUPS配置

我们可以通过修改'/etc/cups/printers.conf'文件来添加新打印机或者删除现有打印机。
它包含现有打印机的定义:

# cat /etc/cups/printers.conf 
# Printer configuration file for CUPS v1.5.3
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer HL4150CDN>
UUID urn:uuid:245d161f-c3c8-39ca-76ad-2b6aba9de0c1
Info HL4150CDN
Location Main Desk
MakeModel Brother HL-4150CDN series CUPS
DeviceURI lpd://10.10.1.8/binary_p1
State Idle
StateTime 1393610675
Type 8392780
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

另一种方法(也许更简单)是使用基于Web的配置实用程序来修改打印机。