ArchLinux安装打印机并在局域网共享


系统信息:


OS:x86_64 Linux 5.2.3-arch1-1-ARCH Printer:Canon_iP2800_series usb连接

安装cups、字体和驱动包(gutenprint)

  • cups - 就是传说中的CUPS软件
  • ghostscript - Postscript语言的解释器
  • gsfonts - Ghostscript标准Type1字体
sudo pacman  -S cups ghostscript gsfonts  gutenprint

这是一些驱动包。根据你的打印机选择合适的包安装。

  • gutenprint - 一组质量非常好的驱动集合,支持的目标机型包括 Canon, Epson, Lexmark, Sony, Olympus;以及配合CUPS/GhostSscript/Foomatic/GIMP使用的 PCL printers。
  • foomatic-db, foomatic-db-engine,foomatic-db-nonfree, and foomatic-filters[broken link: package not found] - Foomatic 是一个基于数据库的,集成自由软件打印机驱动和脱机打印程序的系统。安装 foomatic-filters 可以解决 cups error_log 报告错误 "stopped with status 22!".
  • foo2zjsAUR[broken link: package not found] - Drivers for ZjStream protocol printers such as the HP Laserjet 1018. More info here, Foo2zsj is available in the foo2zjsAUR[broken link: package not found].
  • hplip - HP GNU/Linux 驱动. 支持 DeskJet, OfficeJet, Photosmart, Business Inkjet 和一些 LaserJet printer 型的, 以及一些兄弟打印机。
  • splix - 三星驱动,支持SPL打印机(SPL:Samsung Printer Language) (USB打印机要配合使用 AURcups-usblpAUR[broken link: archived in aur-mirror] )
  • cndrvcups-lbAUR - 佳能 UFR2 驱动,支持LBP, iR 和 MF 系列打印机. 在 AUR 能找到这个包。
  • cups-pdf - PDF虚拟打印机,这个东西可以把发送给他的打印任务输出为PDF文件。

 

编辑配置文件

 sudo vim /etc/cups/cups.conf

ListenLocalhost:631 修改为Listen 0.0.0.0:631(允许所有IP访问631

在<location>,<location/admin>,<location/admin/conf>节点中加入 Allow all(允许所有IP访问web

<Location />

    Allow all

    Order allow,deny

</Location>

 

启用打印机

sudo systemctl start org.cups.cupsd && sudo systemctl enable org.cups.cupsd

sudo systemctl start cups-browsed && sudo systemctl enable cups-browsed

添加打印机

用浏览器打开网址 :x.x.x.x:631(xxxx为连接打印机Linux的ip)

依次选择 Administration > Add Printer(输入root及密码) > 选中打印机 > 点击 Continue > 勾选 Share This Printer > Continue >  选中打印机型号 > Add Printer完成添加。

局域网中win10添加该共享打印机

上图中xxxxxxx为Linux的ip地址,后面的xxx为打印机名称。

 

最后完成即可。



 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM