📄 00000005.htm
字号:
Note which of those settings are preceded with a - in your stty output. Sum <BR>up all those numbers (they are octal). This represents the bits you want to <BR>clear, so the result is your fc# capability. Of course, remember that you will <BR>be setting bits directly after you clear, so you can just use `fc#0177777' <BR>(I do). <BR> <BR> Now do the same for those settings (listed in this section) which do not have <BR>a - before them in your stty output. In my example the important ones are <BR>CS8 (0000060), HUPCL (0002000), and CREAD (0000200). Also note the flags for <BR>your baud rate (mine is 0000015). Add those all up, and in my example you get <BR>0002275. This goes in your fs# capability (`fs#02275' works fine in my example). <BR> <BR> Do the same with set and clear for the next section of the include file, <BR>"c_lflag bits". In my case I didn't have to set anything, so I just use <BR>`xc#0157777' and `xs#0'. <BR> <BR> <BR> 7.2 Older serial printers that drop characters <BR> <BR> Jon Luckey points out that some older serial printers with ten-cent serial <BR>interfaces and small buffers really mean stop when they say so with flow <BR>control. He found that disabling the FIFO in his Linux box's 16550 serial port <BR>with setserial corrected the problem of dropped characters. <BR> <BR> <BR> <BR>8. Vendor Solutions <BR> <BR>This section is, by definition, incomplete. Feel free to send in details of <BR>your favourite distribution. <BR> <BR> 8.1 RedHat 2.x <BR> <BR> RedHat has a GUI printer administration tool which can add remote printers <BR>and printers on local devices. It lets you choose a ghostscript-supported <BR>printer type and Unix device file to print to, then installs a print queue <BR>in /etc/printcap and writes a short PostScript-and-ascii magic filter based <BR>around gs and nenscript. This solution works fairly well, and is trivial to <BR>setup for common cases. <BR> <BR> 8.2 Other Distributions <BR> <BR> Please send me info on what other distributions do. <BR> <BR> <BR> <BR>9. How to print to a printer over the network 如何由网路印表机列印 <BR> <BR>lpd 的一个特徵就是它支援连在不同机器上的网路印表机. <BR> <BR> 9.1 To a Unix/lpd host <BR> <BR> 如果你允许远端机器利用你的印表机列印, 那你首先要将那台机器加入 <BR>/etc/hosts.equiv 或 /etc/hosts.lpd 里(注意在 hosts.equiv 里的机器有其他的用途, <BR>请确定你在这里加入每一台机器的用途), 你也可以只让远端机器利用 rs 这个 <BR>属性来使用你的印表机, 详情请看 lpd 的 man page. <BR> <BR> 如果要利用别人的印表机来列表, 请确定你在 /etc/printcap 中加入了下面几 <BR> 行: <BR> <BR> # REMOTE djet500 <BR> lp|dj|deskjet:\ <BR> :sd=/var/spool/lpd/dj:\ <BR> :rm=machine.out.there.com:\ <BR> :rp=printername:\ <BR> :lp=/dev/null:\ <BR> :sh: <BR> <BR> 请注意, 在本地端 lpd 仍管著一个 spool 的目录. 如果远端机器太忙或是离 <BR>线了, 列表工作就会暂存在这个 spool 目录中, 直到它可以送出去为止. <BR> <BR> 9.2. To a Win95, WinNT, LanManager, or Samba printer <BR> <BR> 利用 smbclient (附於 samba 套件中), 我们可以直接将 lpd queue 透过以 <BR>TCP/IP 为基底的 SMB print 列印出来. Samba 包含了一个叫 smbprint 的 script <BR>可以做到. 最简单的做法是. 你将一个特定印表机的设定档放到 spool 的目录 <BR>中, 然後安装 smbprint script. <BR> <BR> The /etc/printcap entry goes like this: <BR> <BR> lp|remote-smbprinter:\ <BR> :lp=/dev/null:sh:\ <BR> :sd=/var/spool/lpd/lp:\ <BR> :if=/usr/local/sbin/smbprint: <BR> <BR> 你必须阅读 smbprint script 中的文件以获得更多资讯. <BR> <BR> <BR> 9.3. To a NetWare Printer <BR> <BR> 在 ncpfs 套件中有一个 nprint 的工具, 为 NetWare 提供与 smbprint 一样的 <BR>功能. 你可以在 <<A HREF="ftp://linux01.gwdg.de/pub/ncpfs/>">ftp://linux01.gwdg.de/pub/ncpfs/></A> 抓到 ncpfs. From the LSM <BR>entry for version 0.16: <BR> <BR> With ncpfs you can mount volumes of your netware server <BR> under Linux. You can also print to netware print queues and <BR> spool netware print queues to the Linux printing system. You <BR> need kernel 1.2.x or 1.3.54 and above. ncpfs does NOT work <BR> with any 1.3.x kernel below 1.3.54. <BR> <BR> To make nprint work via lpd, you write a little shell script to print stdin <BR>on the NetWare printer, and install that as the if for an lpd print queue. <BR>You'll get something like: <BR> <BR> sub2|remote-NWprinter:\ <BR> :lp=/dev/null:sh:\ <BR> :sd=/var/spool/lpd/sub2:\ <BR> :if=/var/spool/lpd/nprint-script: <BR> <BR> <BR> 9.4. To an EtherTalk (Apple) printer <BR> <BR> I would assume that the netatalk package includes something like nprint and <BR>smbclient. Someone let me know if this can be done! <BR> <BR> 9.5. To an HP or other ethernet printer <BR> <BR> HPs and some other printers come with an ethernet interface which you can <BR>print directly to using lpd. You should follow the instructions that came <BR>with your printer or its network adaptor, but in general, such printers are <BR>"running" lpd, and provide one or more queues which you can print to. An HP, <BR>for example, might work with a printcap like: <BR> <BR> lj-5|remote-hplj:\ <BR> :lp=/dev/null:sh:\ <BR> :sd=/var/spool/lpd/lj-5:\ <BR> :rm=printer.name.com:rp=raw: <BR> <BR> In a large scale environment, especially a large environment where some printers do <BR>not support PostScript, it may be useful to establish a dedicated print server to which all <BR>machines print and on which all ghostscript jobs are run. <BR> <BR> 9.6. Running an if for remote printers <BR> <BR> lpd 奇怪的地方是 if 在远瑞的 printer 上不会动, 如果你发现你必须用到 if, <BR>you can do so by setting up a double queue and requeueing the job. 例如下面 <BR>这个□例: <BR> <BR> lj-5:remote-hplj:\ <BR> :lp=/dev/null:sh:\ <BR> :sd=/var/spool/lpd/lj-5:\ <BR> :if=/usr/lib/lpd/filter-lj-5: <BR> lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\ <BR> :rp=raw:sd=/var/spool/lpd/lj-5-raw: <BR> <BR> in light of this filter-lj-5 script: <BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -