打印和扫描
打印man pages(postscript格式)
/usr/share/man/manX/manpage.X是nroff形式的,X是章节,将他们转换成postscript格式:
groff -Tps -mandoc /usr/share/man/manX/manpage.X
举列:ls manpage转换成postscript并直接打印lpr。
groff -Tps -mandoc /usr/share/man/man1/ls.1 | lpr
如果你想在不同的打印机上打印,你应该安装print/ghostscript (pkgsrc中)
通过smb远程打印
配置 HP JetDirect Card via DHCP
如果你有 HP JetDirect 打印服务器比如jetDirect EX Plus,可以使用dhcpd
来配置打印服务器。步骤如下:
创建/etc/dhcpd.conf
options jd-tftp-cfg code 144 = string;
options jd-tftp-server code 150 = string;
allow bootp;
# [...]
host hp690c {
fixed-address hp690c; # set to the DNS name or address of the JetDirect
hardware ethernet 00:60:b0:00:11:22; # set to the MAC address of the JetDirect
option log-servers servername; # set to the DNS name or address of log server
option jd-tftp-server servername; # set to the DNS name or address of tftp server
option jd-tftp-cfg "hpnp/hp690c.cfg"; # name of the JetDirect config file
}
请参考dhcpd.conf 的manpage
确认tftpd 已经激活(/etc/inetd.conf),注意 -s 参数(在/etc/inetd.conf中的tftpd那一行)。他是tftpd的root目录,
这个例子中root 目录设定为/tftpboot
确认dhcpd已经激活(在/etc/rc.conf)
下一步,创建网络打印接口(NPI)配置文件。这个例子中是/tftpboot/hpnp.hp690c.cfg。类似于:
name: printer name
location: Location of the Printer
contact: Contact Person
idle-timeout: 1800
banner: 0
如果改变了/etc/inetd.conf,请使用kil -HUP `cat /var/run/inetd.pid`来使inetd重读配置文件(一遍激活我们的配置)
当你重新启动打印服务,这个服务将被dhcp配置了。一些打印机,必须从面板中显示的激活bootp/dhcp配置才能运行。
为何sh 禁止"burst"页面,在hp jetDirect上?
扫描仪
netbsd通过graphics/sane-backends 来支持各种scsi扫描仪。前端支持靠graphics/sane-frontends来支持,也可以直接使用图形工具如
graphics/gimp
注意:1.4.2前的netbsd中,内核驱动ss (扫描仪驱动)与graphics/sane-backends使用是导致问题,个别扫描仪不能使用的解决办法是:
重编译内核,去掉ss驱动而使用uk设备驱动,或者升级到1.4.2以后的版本。
---------------------------------------------
20050122 tsgelib v0.1(bsd license)