免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: Benson_linux
打印 上一主题 下一主题

[桌面系统] 请教linux命令行配置和使用网络共享打印机的方法 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-06-03 14:42 |只看该作者
楼上的,配完后应该重启CUPS,然后看看/etc/cups目录下的class.conf文件。这是主配置文件,看看你的内容是否写対。

论坛徽章:
0
12 [报告]
发表于 2008-06-03 21:16 |只看该作者
使用lpadmin配置的,命令是:

  1. lpadmin -p lpnet -E -v ipp://192.168.0.99/lp1
复制代码

使用命令:

  1. /etc/inet.d/cups restart
复制代码

重启cups后,查看发现calsses.conf没有变化,也没有内容:
#
# "$Id: classes.conf,v 1.11 2002/01/02 17:58:37 mike Exp $"
#
#   Sample class configuration file for the Common UNIX Printing System
#   (CUPS) scheduler.
#
#   Copyright 1997-2002 by Easy Software Products, all rights reserved.
#
#   These coded instructions, statements, and computer programs are the
#   property of Easy Software Products and are protected by Federal
#   copyright law.  Distribution and use rights are outlined in the file
#   "LICENSE.txt" which should have been included with this file.  If this
#   file is missing or damaged please contact Easy Software Products
#   at:
#
#       Attn: CUPS Licensing Information
#       Easy Software Products
#       44141 Airport View Drive, Suite 204
#       Hollywood, Maryland 20636-3111 USA
#
#       Voice: (301) 373-9603
#       EMail: cups-info@cups.org
#         WWW: http://www.cups.org
#

########################################################################
#                                                                      #
# This is a sample class configuration file.  This file is included    #
# from the main configuration file (cups.conf) and lists all of the    #
# printer classes known to the system.                                 #
#                                                                      #
########################################################################

#
# Each class starts with a <Class name> definition.  Class names
# can be up to 128 characters in length and are *not* case sensitive.
#
# One <DefaultClass name> entry can appear in this file; if you don't
# define a default destination, the first printer or class becomes
# the default.
#

#<Class sample>
#
# Info: the description for the class.
#

#Info Acme LaserPrint 1000 Printers

#
# Location: the location of the printer.
#

#Location Room 101 in the activities building

#
# State: sets the initial state of the class.  Can be one of the
# following:
#
#     Idle    - Class is available to print new jobs.
#     Stopped - Class is disabled but accepting new jobs.
#

#State Idle

#
# StateMessage: sets the printer-state-message attribute for the class.
#

#StateMessage Class is idle.

#
# Accepting: is the class accepting jobs?
#
#Accepting Yes
#Accepting No
#

#
# Printer: adds a printer to the class.
#

#Printer sample
#Printer sample@host2
#</Class>

#
# End of "$Id: classes.conf,v 1.11 2002/01/02 17:58:37 mike Exp $".
#


printers.conf倒是内容上有变化:
<DefaultPrinter lpnet>
Info lpnet
DeviceURI ipp://192.168.0.99/lp1
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>


同时/etc/cups/ppd目录下边是空的。

是不是我有什么命令没有执行?
[/quote]

论坛徽章:
0
13 [报告]
发表于 2008-06-04 10:05 |只看该作者
我说错了,抱歉!
应该是看你的printers.conf文件,既然刚才的命令配置已经生效,你就应该可以重启cups,然后执行一个lpq看看是否有相应的输出。

如果还是不行,检查防火墙,检查打印机,检查连接。

在Linux系统中打印是非常恶心的问题,涉及的方方面面太多!所以祝你好运!

论坛徽章:
0
14 [报告]
发表于 2008-06-05 16:30 |只看该作者
前两天上不了网了,刚看到了你的回复,我试试,谢谢

论坛徽章:
0
15 [报告]
发表于 2008-06-05 19:46 |只看该作者
按照你说的输入了lpd命令,啥也没有:

[root@Benson gdb]# lpd
2008-06-05-19:45:08.064 rtRjz Get_local_host: 'localhost' IP address not available!

这是什么原因?

论坛徽章:
0
16 [报告]
发表于 2008-06-05 23:19 |只看该作者
原帖由 Benson_linux 于 2008-6-5 19:46 发表
按照你说的输入了lpd命令,啥也没有:


这是什么原因?



那你还是先看看你的ip address为啥not available吧。

这里面使用的地址应该是laser jet的IP地址。看来你的问题不一定在打印上面了。

自己找找问题的原因吧!

论坛徽章:
0
17 [报告]
发表于 2008-06-10 14:46 |只看该作者
试了很长时间,还是不能解决,我准备走smb协议试试

谢谢jerrywjl

论坛徽章:
0
18 [报告]
发表于 2008-06-10 23:46 |只看该作者
唉!其实我认为你的问题可能不在打印的配置上面。
这个东西我用wmware都弄出来了。别说真机器了。

要不这样吧,你用system-config-printers来尝试添加一个jet direct打印机,通过图形界面添加成功的话,看看配置和我上面的有什么不同。

论坛徽章:
0
19 [报告]
发表于 2008-06-19 20:29 |只看该作者
发现打印确实是一个复杂的问题,最近尝试了走smb的方式也不能满足我的需求。

因为目前走smb的方式,虽然windows平台的PC安装了打印机并且能够正常工作,但是linux平台还是需要安装相应的驱动程序,这个确实让我很郁闷。

我想要的理想情况是,windows共享了打印机,linux连接上共享打印机后,本地不需要再安装相应的打印机驱动,而可以通过把文件共享或者通过其他的协议,将要打印的文件传给windows,然后通过windows的打印程序将文件打印出来,当然此时也是使用windows机器上安装的打印机程序。

不知道有没有这样的实现方法,但是我确实很需要这样的处理方式。高手,达人帮忙了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP