linux cups网络打印机,基于CUPS的网络打印服务器
开发板上启动cups的命令为
/etc/init.d/cups stop/start
或service cups restart1.1.23
有时出现cups web管理界面没有响应,需要重启服务。开发板里面的cups目前为1.2.7版本,需要研究与高版本存在的差异。
3、手动安装的cups打印机的一些命令,范例:
/usr/sbin/lpadmin -p LaserJet -E -v parallel:/dev/lp0 -m laserjet.ppd
1.添加名为LaserJet的打印机(-p)
2.启用要使用的打印机(-E)
3.设置要使用的设备和设备类型(-v)
4.使用驱动程序/PPD文件laserjet.ppd (-m)
字符下打印:
/usr/bin/lp -d LaserJet /etc/aliases
lp语法将文件/etc/aliases打印到LaserJet打印机(-d)。
临时禁用和启动打印机:
/usr/bin/disable -r "Changing Paper" LaserJet
/usr/bin/enable LaserJet
CUPS配置
注意,不同的版本界面略有差异,本文所用的软件版本为1.3.9。cups在很多Linux版本中已自带,不需要额外安装。
进入Administration,点击“Add printer”。
选择正确的驱动程序,如果所连接打印机的驱动程序不存在,则必须手工添加驱动程序(略)。
在添加打印机的最后,会提示你输入Linux的root用户名和密码。
从下图可以看到新添加的打印机,名称为test。
重要提示:
1)打开选择administration,基本管理设置中Show printers shared by other systems,Share published printers connected to this system,Allow printing from the Internet这三项选定,即许可共享本地打印机,许可其它操作系统连接和许可网络打印。见【cups提供远程打印服务的配置经验】cups1.3.3。(好像并不是必须的)
2、编辑/etc/cups/cupsd.conf在Location选项添加容许的windows网段。
3、编辑/etc/cups/mime.convs,找到如下一行(很重要,否则会显示答应错误)
#application/octet-stream application/vnd.cups-raw 0 -
将注释去掉。
4、编辑/etc/cups/mime.type,找到如下一行(好像默认并没有注释)
#application/octet-stream
同3一样,将注释去掉。
1、Windows客户端
在使用cups连接的网络打印服务前,必须停止XP的防火墙服务,或添加631的协议。否则会引起问题的。安装步骤如下:
1)在弹出的对话框中选择“添加打印机”
2)选择添加的打印机类型为“网络打印机”
3)在URL下输入地址:,其中10.2.2.3为cups打印服务器的IP地址,631为cups服务端口,ll为添加的打印机的名称。
4)如果提示URL错误,请纠正。否则点击“下一步”,然后提供Windows下的打印机驱动即可。
以上配置在cups1.3.9下测试完成,不敢保证在cups其他版本是否一定通过。
2、Linux客户端
对于已联网并且安装了CUPS的Linux客户端来讲,能够自动检测到网络中的打印机。因此,只需要找到菜单“系统——>首选项——>更多首选项——>默认打印机>”(redhat enterprise server)或“桌面——>首选项——>更多首选项——>默认打印机>”(fedora),将弹出网络上所有已存在的打印机,选择其中的某一在线打印机作为默认打印机即可。
网上提到在客户端要打开631端口或关闭防火墙,显然是错误的。应该是在服务器端打开631端口即可,是否关闭整个防火墙,笔者认为没有必要,不过调试过程中建议disable,以免对调试进度产生不利影响。
如果Linux客户端没有安装CUPS,则需要手工去添加打印机,笔者没有做过研究,网上有一篇文章(http://blog.sina.com.cn/s/blog_5507289e010008ky.html),有兴趣的可以参考。
也可以使用samba服务来共享打印机,这是最常规的做法,只需配置samba服务,将打印机共享即可。
security = share
########## Printing ##########
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#;load printers = yes
load printers = yes
# lpr(ng) printing. You may wish to override the location of the
# printcap file
;printing = bsd
;printcap name = /etc/printcap
# CUPS printing.See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
printing = cups
printcap name = /etc/printcap
# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
;printer admin = @ntadmin
############ Misc ############
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;include = /home/samba/etc/smb.conf.%m
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
#SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
;domain master = auto
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;idmap uid = 10000-20000
;idmap gid = 10000-20000
;template shell = /bin/bash
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = no
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700
# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;comment = Network Logon Service
;path = /home/samba/netlogon
;guest ok = yes
;writable = no
;share modes = no
# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;comment = Users profiles
;path = /home/samba/profiles
;guest ok = no
;browseable = no
;create mask = 0600
;directory mask = 0700
[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
public =yes
writable = no
create mode = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
;write list = root, @ntadmin
按照以上修改后,根据IP地址搜索计算机,应该可以找到打印服务器。
进入后能看到所有的打印机列表,选择其中一款打印机,点击连接即可。
(注:图片太多,不一一上传,太花时间)
linux cups网络打印机,基于CUPS的网络打印服务器相关推荐
- 基于树莓派的网络打印服务器
网络上关于"基于树莓派的网络打印服务器"的资料非常多了,感谢大神们的无私分享,才能让技术不停传递,造福所有人! 建这个服务器的起因和目的很简单: 1. 手边有树莓派 2. 家里有闲 ...
- 网络打印服务器 linux,如何将树莓派配置为打印服务器 | Linux 中国
用树莓派和 CUPS 打印服务器将你的打印机变成网络打印机. 我喜欢在家做一些小项目,因此,今年我买了一个 树莓派 3 Model B[1],这是一个非常适合像我这样的业余爱好者的东西.使用树莓派 3 ...
- 网络打印服务器 linux,在Linux环境下搭建网络打印服务器
一台旧的打印机没有网口,为方便大家使用决定搭建网络打印服务器.能使用的电脑是古董了,只好使用TinyCore安装使用作为打印服务器了. 先下载最新的tinycore 9.0版,使用usbwri ...
- 打印服务器协议,基于TCP/IP协议的嵌入式网络打印服务器设计
摘要: 随着电子技术和计算机网络技术的发展,嵌入式系统在家庭和工业的各个领域都得到了广泛的应用,各种信息家电,网络设备以及工业控制领域都出现了嵌入式系统的身影,其数量已经远远超过了各种通用计算机.但是 ...
- 无线打印服务器与什么打印机相配,网络打印服务器-本地打印机和网络打印机有什么区别? 爱问知识人...
网络打印是指通过打印服务器(内置或者外置)将打印机作为独立的设备接入局域网或者internet,从而使打印机摆脱一直以来作为电脑外设的附属地位,使之成为网络中的独立成员,成为一个可与其并驾齐驱的网络节 ...
- linux 扫描网络打印机,在Debian上设置USB网络打印机和扫描仪服务器
配置网络扫描仪 现在,我们将继续配置打印机服务器来共享扫描仪.首先,安装xsane,这是SANE--扫描仪快捷访问的前端: # aptitude install xsane 接下来,让我们编辑/etc ...
- 用Linux / C实现基于自动扩/减容线程池+epoll反应堆检测沉寂用户模型的服务器框架(含源码)
用Linux/ C实现基于自动扩/减容线程池+epoll反应堆模型的服务器框架 前言 服务器端源码 客户端源码 自定义库 helper.c 和 helper.h helper.c helper.h M ...
- Linux系统下基于IO多路复用的大规模可靠UDP服务器的实现(三)
七.可靠性UDP的优化细节 4.5章节中,我们提到了KCP本身的优化提高,由于可靠性UDP是这个方案是否优秀的关键,而各种可靠UDP协议中都有TCP算法的影子,所以下面我们再仔细的谈一下这个部分.按照 ...
- 网络打印服务器的作用,内置网络打印服务器有什么用?
什么是网络打印 ? 将打印机通过网络服务器,直接链接到网络上,供其它网上计算机进行直接打印的方式. 什么是真正的网络打印? 事实上真正的网络打印,仅仅提供一个网络连接设备是远远不够的.我们最关心的网络 ...
- 香橙派PC Plus电脑开发板制作网络打印服务器
香橙派PC Plus是一款开源的单板电脑,新一代的arm开发板,使用全志Allwinner H3系统级芯片,拥有1GB DDR3 内存,板载8GB EMMC Flash 存储,可以运行Android4 ...
最新文章
- 在vmware的Solaris虚拟机中安装vmtool
- 伪元素控制网页表单样式
- Spring Boot——[JPA 无法注入 JpaRepository 子接口问题]解决方案
- boost::fusion::pop_front用法的测试程序
- html的 button点击事件无效,InfoWindow里面加button,监听button点击事件无效 求解啊...
- 数据中心UPS维护和使用十大注意事项
- 每日源码分析 - Lodash(remove.js)
- 谈一谈为什么我要创建个人博客
- 1、Intellij IDEA中启动NameServer
- [java实战篇]--java的GUI(1)
- 综合实践活动信息技术小学版第三册电子课本_摆事实,讲道理!电子商务讲师证报名入口和费用...
- windows linux jdk8 jdk11下载
- Android adb shell启动应用程序的方法
- 华裔数学天才陶哲轩的传奇
- OpenCV图像阈值:简单阈值、自适应阈值、OTSU、TRIANGLE
- 【Python】使用Zoho/Hotmail给单人/多人发送Email邮件,以及发发送附件
- 【学习笔记】C++ GUI Qt4 第六章 6.4 滚动区域 和 6.5 停靠窗口和工具栏
- 实体店为什么难以留住客户?商业模式值得尝试
- 水清冷冷:PSCC2019/PSCC2020安装教程和学习技巧(附工具)
- riscv-amo原子指令
热门文章
- 论文阅读笔记:GMC Graph-Based Multi-View Clustering
- amr文件怎么转换成mp3格式?
- 樊登读书分享ppt_樊登读书《干法》学习分享
- linux删除文件名的文件夹,Linux删除文件夹和修改文件名
- 利用计算机网络实现OA的功能,中小企业oa办公系统解决方案怎么做?
- bu zhi dao yao zen me zuo
- 私有云的优缺点_概述实施私有云的优点和缺点
- G - The Tourist Guide UVA - 10099
- stm32呼吸灯c语言程序,STM32之呼吸灯
- 站内文章被百度收录的方法