在CUPS(主机)中创建原始打印机队列,并通过CUPS(客户端)添加它们 [英] Creating a raw printer queue in CUPS (host) and adding them through CUPS (client)

查看:658
本文介绍了在CUPS(主机)中创建原始打印机队列,并通过CUPS(客户端)添加它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让RasPi充当由三个Linux客户端组成的小型家庭网络中的小型打印和文件服务器.不幸的是,Brother只为x86提供二进制驱动程序,所以我不能在RasPi上运行Brother打印机.但是,我发现了一个博客条目,提议在RasPi的CUPS安装上创建一个原始队列,并使用客户端上安装的二进制驱动程序从客户端访问此队列.这是博客条目: http://chemdroid.net /en/raspberry-pi/36-raspberry-pi-as-print-server

I want to make my RasPi act as a little print and file server in a small home network consisting of three Linux clients. Unfortunately, Brother provides only binary drivers for x86, so I cannot run my Brother printer on the RasPi. However, I found a blog entry proposing to create a raw queue on the RasPi's CUPS install and access this queue from the clients using binary drivers installed on them. Here is the blog entry: http://chemdroid.net/en/raspberry-pi/36-raspberry-pi-as-print-server

不幸的是,作者没有详细描述如何在RasPi上创建原始队列以及如何从客户端访问它,而是专注于描述在RasPi上安装非标准CUPS版本.

Unfortunately, the author doesn't describe in much details how to create a raw queue on the RasPi and how to access it from the clients, instead he concentrates on describing the installation of a non-standard CUPS version on the RasPi.

我在这里找到了类似的问题: CUPS旁路接口但是,我不完全了解回答.答案中的如何设置CUPS'原始'队列"部分是否引用主机(RasPi)?如果是这样,我必须指定什么插座/端口?打印机是通过USB连接的Brother HL-2030.

I found a similar question here: CUPS bypassing interface However, I don't fully understand the answer. Does the "How to setup CUPS 'raw' queues" section in the answer there refer to the host (the RasPi)? If so, what is the socket/port that I have to specify? The printer is a Brother HL-2030, connected through USB.

从客户端访问打印机时,答案说如何编辑'lp'命令,但是我想通过CUPS使用共享打印机,那么如何在这里进行操作?

When accessing the printer from the clients, the answer says how to edit the 'lp' command, however I want to use the shared printer through CUPS, so how do I proceed here?

感谢您的任何输入!

光子

推荐答案

[...]如何在RasPi上创建原始队列

[...] how to create a raw queue on the RasPi

  1. 通过Pi(或SSH/Putty会话)将您自己添加到lpadmin组中

  1. From the Pi (or an SSH/Putty session) add yourself to the lpadmin group

sudo adduser $USER lpadmin

启用远程管理(或 sudo cupsctl --remote-admin

循环CUPS以确保它喜欢您

Cycle CUPS to make sure it likes you

sudo service cups restart-或-sudo /etc/init.d/cups restart

导航到 http://localhost:631 (如果您没有键盘访问权限,则为http://<ip_address_of_pi>:631来自另一台计算机)

Navigate to http://localhost:631 (of if you don't have keyboard access: http://<ip_address_of_pi>:631 from another machine)

导航到管理,添加打印机

Navigate to Administration, Add Printer

a.当提示您登录时,请使用您的标准用户名和密码.

a. When prompted to login, use your standard username and password.

b. 注意::如果密码无效,请sudo reboot,然后重试.

b. Note: If the password doesn't work, sudo reboot, try again.

AppSocket/HP JetDirect,然后:

AppSocket/HP JetDirect, then:

a. 网络已连接:socket://<ip_of_printer>:9100

b. 已连接USB: socket://<usb_handle>使用lpinfo -v |grep usb:查找,您不需要?location = 1a200000"信息.假定首先安装了正确的驱动程序.请注意,如果您的设备驱动程序未提供用于ARM体系结构,请参见这篇文章.

b. USB Attached: socket://<usb_handle> find using lpinfo -v |grep usb:, you don't need the "? location=1a200000" information. Assumes proper driver is installed first. Note, if your device driver isn't offered for ARM architecture, see this article.

制作:原始(非通用)

返回CUPS管理页面,网址为 http://localhost:631 一种.通过以下方式启用打印机共享:

Go back to CUPS Administration page at http://localhost:631 a. Enable printer sharing via:

.[X] Share printers connected to this system

. [X] Allow printing from the internet

[...]如何从客户端访问它

[...] how to access it from the clients

这在平台之间差异很大.

This varies greatly between platforms.

  1. 常规URL格式为: http://<ip_of_pi>:631/printers/<name_used_in_step_8_above>

  1. The general URL format is: http://<ip_of_pi>:631/printers/<name_used_in_step_8_above>

a. Windows:设备和打印机,添加打印机(不添加设备",在工具栏中),手动选择/未列出,具有手动设置的本地或网络打印机,创建新端口,标准TCP/IP端口

a. Windows: Devices and Printers, Add Printer (NOT Add Device, it's in the toolbar), Manually Select/Not Listed, Local or Network Printer with Manual Settings, Create a new port, Standard TCP/IP Port

b. MacOS::启用,然后使用CUPS Web界面. GUI无法做到这一点.您需要成为管理员组,并且知道您的用户ID(例如echo $USER)

b. MacOS: Enable, then use the CUPS web interface. The GUI can't do it. You'll need to be in admin group and know your user id (e.g. echo $USER)

c. Linux::使用GUI或CUPS,网络打印机,AppSocket/HP JetDirect

c. Linux: Using the GUI or CUPS, Network Printer, AppSocket/HP JetDirect

这篇关于在CUPS(主机)中创建原始打印机队列,并通过CUPS(客户端)添加它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆