首先将打印机usb口接入玩客云,输入lsusb查看是否能够识别到你的打印机,如果不显示,说明该打印机不被支持,以下步骤均无法进行!!!!
这里建议先在路由器后台将盒子的ip改为静态ip,防止以后因为ip变动出现的打印失败
apt update
apt-get install cups #如需要确认,直接y即可
systemctl start cups
有些教程说到这里输入ip:631就可以看到cups的设置界面,这是错误的,因为此时的cups只监听本机
输入vim /etc/cups/cupsd.conf编辑cups配置文件
# Only listen for connections from the local machine.
Listen 0.0.0.0:631 #0.0.0.0表示监听所有来源,可根据实际情况修改,631是监听端口可根据自己需要修改监听端口
Listen /var/run/cups/cups.sock
# Restrict access to the server...
<Location />
Order allow,deny
Allow all #允许所有ip访问,可根据实际情况修改
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow all #允许所有ip访问,可根据实际情况修改
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow all #允许所有ip访问,可根据实际情况修改
</Location>
修改完成后执行
systemctl restart cups #重启cups
systemctl enable cups #允许cups开机自启
将打印机插入盒子侧方的usb口
浏览器打开https://ip:631,此时会提示不安全,,继续访问即可
登录cups管理页面,依次点击Administration->Add Printer->点击网页显示的地址->输入登录ssh时的账号密码(需为root),此时你应该可以在Local Printers一项后面看到你插上的打印机,接着点continue到添加驱动页面,通过厂家和型号来搜索你的打印机驱动。当然,你的打印机型号不一定会出现在驱动列表中,此时请参照后文所写安装驱动 如果你在列表中发现了自己的打印机型号,便可以直接选中,然后填写打印机的名字和描述,并确保Share This Printer打上钩,下一步即可
apt install print-driver-gutenprint
apt install print-driver-escpr
执行完后应该就可以在cups管理页找到自己型号的打印机驱动