📄 00000002.htm
字号:
-r-s--s--x 1 root lp 16388 Apr 29 09:39 /usr/bin/lpq <BR>-r-s--s--x 1 root lp 16388 Apr 29 09:39 /usr/bin/lpr <BR>-r-s--s--x 1 root lp 16388 Apr 29 09:39 /usr/bin/lprm <BR>-r-xr-s--x 1 root lp 20484 Apr 29 09:38 /usr/sbin/lpc <BR>-rwxr--r-- 1 root lp 36868 Apr 29 09:39 /usr/sbin/lpd <BR>-rwxr-xr-x 1 root lp 8196 Apr 29 09:39 /usr/sbin/lpf <BR>-r-x------ 1 root lp 8196 Apr 29 09:39 /usr/sbin/lptest <BR> <BR>2. 修改/etc/printcap , 不知为何我这样设会成功. <BR> <BR># Copyright (c) 1983 Regents of the University of California. <BR># All rights reserved. <BR># <BR># Redistribution and use in source and binary forms are permitted <BR># provided that this notice is preserved and that due credit is given <BR># to the University of California at Berkeley. The name of the University <BR># may not be used to endorse or promote products derived from this <BR># software without specific prior written permission. This software <BR># is provided ``as is'' without express or implied warranty. <BR># <BR># <A HREF="mailto:@(#)etc.printcap">@(#)etc.printcap</A> 5.2 (Berkeley) 5/5/88 <BR># <BR># <BR>lp:lp=/dev/lp1:sd=/usr/spool/lp1:sh:if=/usr/spool/lp1/lpf:mx#0: <BR>ps:lp=/dev/lp1:sd=/usr/spool/lp1:sh:if=/usr/spool/lp1/ps_filter:mx#0: <BR># <BR> 在这两行中, 我设两个印表机名称, 以便分别印文字档与postscript档 <BR> <BR> 当然, 这两个filter档要自己写: <BR> <BR>/usr/spool/lp1/lpf的内容: <BR>#!/bin/sh <BR># Filter for HP printers to treat LF as CRLF <BR># the "echo -ne" assumes that /bin/sh is really bash <BR>echo -ne \\033\&k2G <BR>cat <BR>echo -ne \\f <BR> <BR>/usr/spool/lp1/ps_filter的内容. <BR>#!/bin/sh <BR>/usr/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=ljet4 -sPAPERSIZE=a4 -r300 <BR>-sOutputFile=- - <BR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^要改! <BR>当然请记得它们的属性: <BR> <BR>/usr/spool/lp1/: <BR>-rwxr-xr-x 1 root lp 145 Sep 27 19:06 lpf <BR>-rwxr-xr-x 1 root lp 96 Sep 27 17:34 ps_filter <BR> <BR>3. 来测试一下! 聪明如各位一定可看出名称lp是印普通文字, 名称ps是印ps档. <BR> <BR> 先找一份大於一页的英文文件档(自己乱打也行),试试: <BR> <BR> cat filname > /dev/lp1 <BR> <BR> 看看印表机可有"动作", 它不一定会印出正确内容, 看有没有动即可. <BR> 若已印出正确内容, 可以考虑不用/usr/spool/lp1/lpf filter. <BR> <BR> 再用 lpr -Plp filename 看看它有没有印对? <BR> <BR> ps档, 可用/usr/lib/ghostscript/examples/tiger.ps当□例. <BR> <BR>gs -sDEVICE=ljet4 -sOutputFile=/dev/lp1 -sPAPERSIZE=a4 -r300 tiger.ps <BR> ^^^^^^^^^^^^^^^一定要改 ^^^^^^一定要改! <BR> <BR> 看看印出老虎没? <BR> <BR> 若有, 试试 <BR> <BR> lpr -Pps tiger.ps 看成不成. <BR> <BR> ghostscript预视功能: 必须要有VGA <BR> <BR> 试试gs -sDEVICE=linux tiger.ps <BR> <BR> 若萤幕撑不下1024X768, 看man gs的说明 加上-r???x???x???参数: <BR> <BR> These are the recognized video modes, (and mode numbers): <BR> <BR> 320x200x16 (1), 640x200x16 (2), 640x350x16 (3), <BR> 640x480x16 (4), 320x200x256 (5), 320x240x256 (6), <BR> 320x400x256 (7), 360x480x256 (8), 640x480x2 (9), <BR> 640x480x256 (10), 800x600x256 (11), 1024x768x256 (12), <BR> 320x200x32K (13), 320x200x64K (14), 320x200x16M (15), <BR> 640x480x32K (16), 640x480x64K (17), 640x480x16M (18), <BR> 800x600x32K (19), 800x600x64K (20), 800x600x16M (21), <BR> 1024x768x32K (22), 1024x768x64K (23), 1024x768x16M (24), <BR> 1280x1024x256 (25), 1280x1024x32K (26), 1280x1024x64K (27), <BR> 1280x1024x16M (28), 720x350x16 (29), 720x480x16 (30), <BR> <BR> In addition to -r<resolution>, these flags also work with <BR> -sDEVICE=linux: <BR> <BR> <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -