【GNU/Linux, Debian】使用cups连接HP Laserjet 1012 HB打印机

woc我怎么第一版打的cpus

Cups是个开源的打印软件,于2007年被苹果收购(包括作者负责人也被苹果雇佣),收购后任然使用GPL发行。

然而2021年年底,作为收购前负责人的他表示这个软件再也不是美国苹果公司所维护的了,而是OpenPrinting接管后继的开发与维护。

使用cups而不用smb进行局域网分享的好处是iOS、macOS设备可以直接连接打印(Windows设备则是手动添加)


 

安装cups

复制代码
apt upgrade
apt install printer-driver-all
apt install cups

#如果是iptables
iptables -I INPUT -p tcp --dport 631 -j ACCEPT


#如果是firewalld
firewall-cmd -- permanent --add-port=631/tcp
sudo service firewalld restart
复制代码

修改配置文件

nano /etc/cups/cupsd.conf

配置文件里添加【Allow all】

复制代码
# Only listen for connections from the local machine.
Listen 0.0.0.0:631
Listen /run/cups/cups.sock

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
Allow all
</Location>

<Location /admin>
  Order allow,deny
Allow all
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
Allow all
</Location>
复制代码

ctrl+O,回车,然后ctrl+X,保存完成后重启cups

systemctl restart cups

 

cups网页端管理添加打印机并设置

然后在浏览器的【无痕模式】打开{IP地址}:631/admin,比如

http://10.192.56.122:631/admin

登入后就是这个界面,一步步添加打印机即可

 

 

 

使 用 有 ROOT 权 限 的 账 号 密 码 登 录,否则会提示

 

 

 因  为  我  找  了  好  久  都  没  找  到  账  号  登  出  按  钮 ! ! ! ! ! ! ! ! !

 

 

 

 

 

dlc1: 使用惠普的官方的HPLIP(我安装到后面卡住了)

#下载网址
https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

wget https://sourceforge.net/projects/hplip/files/hplip/3.22.6/hplip-3.22.6.run
chmod 0755 ./hplip-3.22.6.run
./hplip-3.22.6.run

 

dlc2: Debian官方文档参考

参考:https://wiki.debian.org/SystemPrinting

posted on   Cela  阅读(1259)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
Copyright ©Cela
Design by Cela
点击右上角即可分享
微信分享提示