📄 x342.html
字号:
<!DOCTYPE HTML PUBLIC "-//Norman Walsh//DTD DocBook HTML 1.0//EN"><HTML><HEAD><TITLE>Printer Support</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet"><LINKREL="HOME"TITLE="The Linux USB sub-system"HREF="book1.html"><LINKREL="UP"TITLE="How to get USB devices working under Linux"HREF="c122.html"><LINKREL="PREVIOUS"TITLE="USB Modem Support"HREF="x332.html"><LINKREL="NEXT"TITLE="USB Serial Converter support"HREF="x356.html"></HEAD><BODY><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">The Linux USB sub-system</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x332.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 2. How to get USB devices working under Linux</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x356.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN342">Printer Support</A></H1><P>You need to set up a device node entry for the printer. Use thefollowing command:<TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="SCREEN">mknod /dev/usb/lp0 c 180 0</PRE></TD></TR></TABLE></P><P>Different printer tools are installed with various different rights,and this may affect the access priviledges that you need withthe device entry. It is normally correct to make <TTCLASS="FILENAME">/dev/usb/lp0</TT>rights the same as <TTCLASS="FILENAME">/dev/lp0</TT>, using the<SPANCLASS="SYSTEMITEM">chmod</SPAN>, <SPANCLASS="SYSTEMITEM">chown</SPAN> and<SPANCLASS="SYSTEMITEM">chgrp</SPAN> commands.</P><P>You should now be able to use this device in a normal<TTCLASS="FILENAME">/etc/printcap</TT> entry. I recommend use of automatedtools to generate such files, such as RedHat's control panelprint-tool.I find this driver to be pretty good, although perhaps abit slow.</P><P>If this does not appear to work, check that you have actually loaded the module, and double-check the <TTCLASS="FILENAME">/etc/printcap</TT>entry - especially that the device file matches the one you justcreated. Also note that some printers require special controlcharacters to be sent to the printer to get the USB interface to bemade operational. This is printer specific.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x332.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x356.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">USB Modem Support</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="c122.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">USB Serial Converter support</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -