debian系统怎么连接服务器,zh_CN/SystemPrinting

Debian 打印 (CUPS)

关键词:Linux Printing, Debian, cups system, HP Linux and Image software, Install, Add , Change Printers, Print Server, Linux 打印, HP Linux 和图像软件, 安装, 添加, 更改打印机, 打印服务器,

通用 UNIX 打印系统(英文 The Common UNIX Printing System,缩写 CUPS)是一个打印系统,通常是 lpd 和其他旧打印系统的替代者。CUPS Debian 包简单易用、功能强大,让打印在 Debian 上更加方便。(http://www.cups.org/)

安装

安装软件:

aptitude update

aptitude install cups cups-client启动软件:

/etc/init.d/cups start

提示:上述命令需要管理员权限,在执行上述命令时可在前面添加 sudo 来执行。

添加打印机

在网页浏览器中打开下面网址,来添加打印机:

http://localhost:631/

下面我们就可以通过 CUPS 的管理界面(“Administration”标签页下)来添加打印机了。如果您遇到权限错误,可尝试下面命令将您的帐号添加到 lpadmin 用户组。比如,您的用户名为“tom”,则:sudo usermod -a -G lpadmin tom[可选]如果您在服务器环境,没有 Firefox 这样的网页浏览器,您可安装类似 lynx 或 elinks 这样的文本网页浏览器。

aptitude install lynx-cur

或aptitude install elinks现在使用文本编辑器打开上述指定的地址。

elinks http://localhost:631/按照下图所示设置默认打印机。

d68ad6afc4123cda1ace36dbb9af8ea6.png

添加 kyocera 打印机

在终端输入:

elinks http://localhost:631/点击 Do Administration Task————Add New Printer,输入下面信息:

Name: kyocera9520

Location: Back Room

Description: High output printer点击 Continue

点击 !AppSocket/HP JetDirect

如果您有一台可以直接打印的网络打印机,则选择:

LPD/LPR Host Printer接着修改设备的 URI,如下所示:

socket://hostname:9100接着,选择Make。然后是Model。如果您的模块不在此处,您可以尝试着选择类似的打印机序号/驱动,应该可以正常工作。

一切完成后,返回到原菜单。点击Set Default Printer。

欧啦。下面的内容可选

打印机状态

查看有打印机运行吗?

lpstat -r瞅瞅默认的打印机是啥?

lpstat -d打印机队列

lpq

打印到 PDF

您可能没有物理打印机(穷啊),但要打印的文档已准备就绪,则可以选择打印一份 PDF 文件。

首先,需要安装 cups-pdf:aptitude install cups-pdf

安装完成,在 Gnome 中可按下下面步骤设置打印机:系统设置--> 硬件--> 打印机

在此处您会看到一个打印机列表,和一个“添加新打印机”按钮。

现在按照下面步骤一步一步来吧:选择“本地打印机”,“已探测到的打印机” --> “PDF 打印机“。

Manufacturer --> Generic,

Model --> postscript color printer rev4,

Driver --> Standard

Apply

最终,你会在你的Home文件夹中发现一个PDF文件夹。

CUPS 管理

http://localhost:631/

无打印机驱动

大部分更常见的打印机应该已经有驱动包含在 cpus 系统里了。对于更新的或是更商业化的打印机,先去浏览制造商的网站。你应该寻找和你的打印机型号相对应的PPD文件。PPD文件描述了打印机的功能。对各打印机型号的综合描述和数据库、驱动、PPD 文件,请参见 http://www.linuxprinting.org

Brother(兄弟)

Canon(佳能) (PPD)

对于像 Imagerunner 5065 的复印机、打印机、扫描仪

HP(惠普)

安装 hplip 软件包。对于新的打印机,可能有必要直接从项目主页下载和安装 hplip 。在这里查找你的打印机:HPLIP 支持的打印机。这个页面会显示你的型号所需要的hplip版本。运行 hp-setup 配置打印机(见下文)。

Kyoceramita (PPD)

Samsung(三星)

可选的自动化配置

system-config-printer (正式地被称为 'printconf')

system-config-printer 是一个首次出现在 Fedora,后来出现在 Debian 和 Ubuntu 的打印机管理工具。这个工具的目的在于使用 CUPS 的 API 配置一个 CUPS 服务器(通常在本机)。这个工具使用 Python 编写,使用 pygtk 作为图形界面,以及一些 Python 接口(pycups)作为 CPUS API。

它在很大程度上和使用CUPS打印机网页配置界面是相同的,但是它有一个优势是:它是本地应用程序而不是网页。

用'hp-setup'配置HP打印机

hp-setup 被包含在 HP Linux Imaging & Printing 项目软件包 hplip 中, 用于完成 USB、parallel、网络打印机一体机的配置。网络打印机通过 mDNS (在 Mac 上被称为 Bonjour)被自动检测发现。使用 hp-setup 安装打印机也将启用 hp utilities 来检查墨水、碳粉量和打印机维护状态。运行 'hp-check -r' 来解决打印或扫描问题。

打印机共享

CUPS作为其他Windows机器的打印服务器

你可以设置 CUPS 允许 Windows 设备通过一个 http 地址打印到 CUPS 服务器

首先,安装软件包 samba 。 当你被询问是否使用 WINS,选择 yes。$ aptitude install samba

然后设置你的 /etc/cups/cupsd.conf 文件# 我们监听的私有连接

Listen *:49631

# 允许本地网络的设备使用打印机

Order allow,deny

Allow 192.168.0.*

Allow 192.168.1.*

这将在所有网络监听49631端口。你可以使用除了631以外的其它端口号。需要提醒的是,由 IANA 指定的动态及私有的端口是从 49152 到 65535。此外,这将只允许本地网络的设备打印到 CUPS 的打印机。

下一步,重启 CUPS 守护进程$ /etc/init.d/cups restart

现在在每个 Windows 设备上选择 你想安装的网络打印机,你打印机所在的 互联网或家庭办公室网络,你将使用的 URL 应该是:http://:49631/printers/

最后,要安装的驱动在 Generic 部分,被标记为 MS Publisher Color Printer 。

CUPS 和 Samba

This section needs updating as you can setup print server via samba print sharing just by uploading drivers.

When printing to windows printers in an NT domain using SMB the Device URI should readsmb://username:password@domain/server/printername

This allows Samba to authenticate against a domain controller for acces to the printer queue.

When printing to a Debian CUPS printer from a machine that connects through Samba, you may need to set up a CUPS class to get things to work.

Printer sharing using Macintosh as the client and Debian as the server

You have a printer on a debian machine and you want to share it with a Macintosh, so that the Mac can print to the Debian-based printer. Try this:

1. Use cups to set up the printer on Debian as described above. The Gnome tool for printer configuration works well, and the 100% bullet-proof way is to use the browser-based CUPS configuration.

2. On the Mac (OS X 10.4+) start Print and Fax from System Preferences. Use the + button to add a printer.

3. Look first in the "Default" tab. If the automagic printer-sharing has worked, and your Mac is connected to the local network properly, then the Debian-based printer should already be visible in the list. Just select it and use the recommended print driver. Your results may vary but you can't go to far wrong if you pick a driver that matches the one you are using on Debian. So, for example, you might like to try using Gutenprint drivers at both ends.

4. If your printer is not visible in the Default tab, then try adding it on the "IP" tab. Pick IPP as the protocol, give the plain IP address of the server in the address box, and in the Queue box put "printers/". Put whatever helps you identify the printer in the Name and Location boxes, and choose a printer driver than matches what you used to set up the printer on Debian. Finally cross your fingers, hold your breath, recite a prayer/spell/incantation, and press the Add button.

As they say: your mileage may vary.

打印图片

Professional looking photos may be obtained when using high quality glossy photo paper on an inkjet printer but care must be taken when submitting the print job. Printing from The Gimp image manipulation program produces very good results. The print dialog will vary depending upon the printer used. The most important settings are type of paper, glossy photo or whatever sort you are using, and image type, "photograph". The size of the printed image is adjusted in the printer dialog as well.

其他打印系统

在 Debian 下可以使用下面几种可用的打印系统:CUPS. (以上所介绍的.) 这个较新的 Common UNIX Printing System (or CUPS) 是一个打印系统并且普遍作为lpd和类似系统的替代品。 它支持Internet Printing Protocol (IPP), 并且有自己的自己的过滤驱动程序模型来处理不同的文档类型。

LPR. 仍然普遍使用传统的印刷系统称为lpr,lpr能够工作的很好postscript. 另外,它的配置不是很简单并且不能够在每次打印的设置中为用户提供更多的控制选项。

RLPR Remote line printer spooling system.

xpp is designed to be able to take the same command-line arguments as BSD-lpr and SysV-lp so most apps won't realize the difference if you create a symbolic link from /usr/bin/lpr (or /usr/bin/lp) to /usr/bin/xpp. This way, whenever an application sends off a print job to the lpr (or lp) program, xpp will launch its GUI so that you can select the options that you would like for this job.

这些打印系统由不同的小组来维护,但他们之间也有很多合作与协调,可查看列表 debian-printing。

外部链接

参见

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值