Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16649 Details for
Bug 22244
Make the printing guide easier to read for people printing over smb onto windows shares
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
printing-howto.xml
printing-howto.xml (text/plain), 13.94 KB, created by
Heinrich Wendel (RETIRED)
on 2003-08-26 12:52:25 UTC
(
hide
)
Description:
printing-howto.xml
Filename:
MIME Type:
Creator:
Heinrich Wendel (RETIRED)
Created:
2003-08-26 12:52:25 UTC
Size:
13.94 KB
patch
obsolete
><?xml version='1.0' encoding="UTF-8"?> > ><guide link = "/doc/en/printing-howto.xml"> > <title>Gentoo Printing Guide</title> > <author title="Author"><mail link="zhen@gentoo.org"> > John P. Davis</mail> > </author> > <author title="Copyeditor"><mail link="sunflare@gentoo.org">Phil Bordelon</mail> > </author> > <author title="Editor"><mail link="wleggette@gate.net">Wesley Leggette</mail> > </author> > <author title="Editor"><mail link="carl@gentoo.org">Carl Anderson</mail> > </author> > <author title="Editor"><mail link="lanius@gentoo.org">Heinrich > Wendel</mail></author> > > <license/> > > <abstract>A comprehensive printing guide for Gentoo Linux. > This document covers both local and network printing. > </abstract> > > <version>1.2</version> > <date>26th August 2003</date> > > <chapter> > <title>Installing CUPS and foomatic</title> > > <body> > > <p>Setting up printing in Gentoo Linux is a relatively painless task, thanks > to some great programs such as CUPS (the Common Unix Printing > System) and foomatic. Both of these programs are > currently in the Portage tree, and they are very easy to set up for the > end user. > </p> > > <p>Please be aware the cups is cross-desktop, i.e. you can follow > these directions to get printing working under GNOME or KDE. > There are other options, such as KDE's print setup, but I believe that > CUPS is the easiest to setup, and the most scalable. > </p> > > <p>Before emerging CUPS, it is a good idea to add the necessary > USE flags to <path>/etc/make.conf</path>. > </p> > > <pre caption = "Editing /etc/make.conf"> ><comment>add <i>cups</i> and <i>usb</i> (if you are using a USB printer connection) to your existing USE var list. </comment> >USE="cups usb other_var1 other_var2"</pre> > > <p>For more information on USE variables, please see the > <uri link = "http://www.gentoo.org/doc/en/use-howto.xml">USE HOWTO</uri>. > </p> > > <pre caption = "Emerging necessary packages"> ># <c>emerge cups</c> ># <c>emerge foomatic </c></pre> > </body> > </chapter> > > <chapter> > <title>Setting up Kernel Modules</title> > <section> > <title>General</title> > <body> > <p>Now that the necessary packages are installed, it is time to install the printer.</p> > > <p>Depending on what type of printer connection you will be using, it will > be necessary to enable either parallel port or USB port printer connections > in the kernel.</p> > > <note>This is only needed for local printing, if you want to print via samba, skip this section.</note> > > <note>If you are not sure on how to compile the kernel, the official > Linux Kernel-HOWTO can be found <uri link="http://www.tldp.org/HOWTO/Kernel-HOWTO.html">here</uri>. Make sure you find out how to compile and install new modules without having to recompile your kernel or restart your computer. It's a real timesaver. > </note> > </body> > </section> > <section> > <title>USB Modules</title> > <body> > <p>To enable USB printer support, go to <c>USB support</c> and enable <c>Support for USB</c> and > <c>USB Printer support</c>. Enabling them both as modules will install usbcore.o and > printer.o in your modules directory. I suggest using modules because you won't have > to restart your computer. > </p> > > <p>After the kernel is built, and your computer restarted, it is time to load the > necessary modules: > </p> > > <pre caption = "Loading USB modules"> ># <c>modprobe usbcore</c> ># <c>modprobe printer</c></pre> > > <p>After the modules have loaded successfully, plug in the printer, and check > <path>/var/log/messages</path> to see if it was detected. > </p> > > <note>If you are using something other than sysklogd, your kernel log file will be different.</note> > > <pre caption = "Checking Kernel Messages"> ># <c>tail /var/log/messages</c></pre> > > <p>You should see something like this: > </p> > > <pre caption = "/var/log/messages Output"> >hub.c: USB new device connect on bus2/2, assigned device number 2 >printer.c: usblp0: USB bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1104</pre> > </body> > </section> > <section> > <title>Parallel Port Modules</title> > <body> > <p>To enable Parallel port support, go to <c>Parallel port support</c> and enable <c>Parallel port support</c> and <c>PC-style hardware</c>. Depending on your printer you also have to activate <c>Multi-IO cards (parallel and serial)</c>, <c>Support for foreign hardware</c> and <c>IEEE 1284 transfer mode</c>. Then go to <c>Character devices</c> and enable <c>Parallel Printer Support</c>.</p> > > <p>After the kernel is built, make sure that the printer is plugged in and then restart restarte your computer. Now it is time to load the necessary modules: > </p> > > <pre caption = "Loading Parallel Port modules"> ># <c>modprobe parport</c> ># <c>modprobe parport_pc</c></pre> > > <p>After the modules have loaded successfully, plug in the printer, and check > <path>/var/log/messages</path> to see if it was detected. > </p> > > <note>If you are using something other than sysklogd, your kernel log file will be different.</note> > > <pre caption = "Checking Kernel Messages"> ># <c>tail /var/log/messages</c></pre> > > <p>You should see something like this: > </p> > > <pre caption = "/var/log/messages Output"> >lp0: using parport0 (polling).</pre> > </body> > </section> > <section> > <title>Low-level testing</title> > <body> > > <p>Before setting up the printer with CUPS, we can test it with some simple low-level commands. > </p> > > <pre caption = "Printer Testing Using cat"> ># <c>touch test.txt</c> ># <c>echo "Hello World" > test.txt</c> ># <c>cat test.txt > /dev/usb/lp0 </c> > ><comment> Alternatively, for parallel port printers: </comment> ># <c>cat test.txt > /dev/lp0 </c></pre> > > <note> > Some printers (e.g. several HP LaserJets) need a ^L > (Control-L) at the end of the file to trigger printing. > Without the ^L the cat succeeds, but the printer absorbs > the data, then sits and does nothing. > </note> > </body> > </section> > </chapter> > > <chapter> > <title>Special Printer Drivers</title> > > <body> > <p> > Before you use foomatic to generate a PPD file, it may be necessary to locate the third party drivers for your printer. For example, Epson provides <uri link="http://www.epkowa.co.jp/english/linux_e/linux.html">several printer drivers</uri> for open source operating systems. However, as with Epson's, many of these special drivers are not open source.</p> > > <p>The following printing drivers are available as > ebuilds in portage: gimp-print, omni, hpijs, pnm2ppa.</p> > > <p> > For most printers besides HP Inkjets, you will be able to use the standard Linux printer drivers. Visit the <uri link="http://www.linuxprinting.org/printer_list.cgi">linuxprinting.org printer support database</uri> to find information on your specific printer. Make sure you read the documentation provided with any driver you download for installation and licensing information. > </p> > > <impo>If you are using an HP Inkjet printer, it is necessary to emerge the <c>hpijs</c> printer driver. This driver handles all of the Postscript interpretation necessary to make the HP printer work. The <c>hpijs</c> driver is for HP Inkjet printers only, but is available through Portage for your convenience. The documentation from HP for the <c>hpijs</c> driver will be placed in <path>/usr/share/doc/hpijs-<version></path>. The author <i>highly</i> recommends reading this. > </impo> > > <pre caption = "Emerging hpijs"> ># <c>emerge hpijs</c></pre> > > <note>If you are using a HP Laserjet, support may already be available via the GNOME printing system. If you are using a non HP Inkjet printer, you do not need to install this special printer driver. > </note> > </body> > </chapter> > > <chapter> > <title>PPD File Configuration</title> > > <body> > <p>Now it is time to configure the printer and CUPS. In order for your printer to interpret Postscipt correctly, CUPS needs a PPD (Printer Postscript Definition) file. The easiest way to generate a PPD is through foomatic. > </p> > > <p>Three pieces of information are necessary in order to make the below command work; > you need your printer ID, printer device, and your print driver (this would be hpijs if you needed to install the special driver above). The printer ID and driver can be <c>grepped</c> from foomatic's database, and the print device is what device node your printer is connected to (i.e. <path>/dev/lp0</path> or <path>/dev/usb/lp0</path> or for samba printers <path>smb://user:password@server/share</path>). > </p> > > <p>Before using <c>foomatic-configure</c>, please remember to start <i>cupsd</i></p> > > <pre caption = "Starting cupsd"> ># <c>/etc/init.d/cupsd start</c></pre> > > <pre caption = "General Usage of foomatic"> ># <c>grep $printer_model /usr/share/foomatic/db/source/printer/* </c> ># <c>grep $printer_ID /usr/share/foomatic/db/source/driver/* </c> ># <c>foomatic-configure -s cups -p $printer_model_number -c $print_device_path -n queue name -d driver </c></pre> > > <p>Now, here's a more specific example. The following code assumes that you have an Epson Stylus Color 980. Of course, you should replace this with your actual printer model. > </p> > > <pre caption="Specific Usage of foomatic with Stylus Color 980"> ># <c>grep Stylus Color 980 /usr/share/foomatic/db/source/printer/* </c> ><comment> Now look for the line which reads: </comment> >/usr/share/foomatic/db/source/printer/Epson-Stylus_Color_980.xml: <model>Stylus Color 980</model> ><comment> Epson-Stylus_Color_980 is your printer ID. </comment> > ># <c>grep Epson-Stylus_Color_980 /usr/share/foomatic/db/source/driver/* </c> >/usr/share/foomatic/db/source/driver/gimp-print-ijs.xml: <printer><id>printer/Epson-Stylus_Color_980</id></printer> ><comment> Here, your print driver is gimp-print-ijs.</comment> > ># <c>foomatic-configure -s cups -p Epson-Stylus_Color_980 -c file:/dev/lp0 -n Epson -d gimp-print-ijs </c></pre> > > <impo>If you are having problems, please refer to the foomatic documentation > <uri link="http://www.linuxprinting.org/foomatic/USAGE">here</uri> > and the <uri link="http://www.linuxprinting.org">linuxprinting.org</uri> > homepage for more information. > </impo> > > </body> > </chapter> > > <chapter> > <title>CUPS Configuration</title> > <body> > > <p>Since the printer itself is now configured, now CUPS must be setup > to handle the printer queueing. CUPS can be accessed via web browser on port 631 of the printer server. > </p> > > <impo>CUPS has a built in configuration file for the daemon that should, but does > not have to, be modified. You might want to take a gander at it, it is > <path>/etc/cups/cupsd.conf</path>. > </impo> > > <pre caption = "Adding CUPS to default runlevel, and starting CUPS"> ># <c>rc-update add cupsd default</c> ># <c>/etc/init.d/cupsd start</c></pre> > > <p>The CUPS daemon should now be running, so open up your favorite browser, point > it to <uri link="http://127.0.0.1:631">here</uri> and click on <c>Manage Printer</c>. > Here you can find your newly installed printer, configure it or print a test page. > </p> > > <note>If the printer does not work for some reason, go to the directory where you > told your CUPS logs to be stored, and look through <i>error_log</i>. > </note> > > </body> > </chapter> > > <chapter> > <title>Configuring programs to print using CUPS.</title> > <section> > <title>General</title> > <body> > <p>Most programs today have a native cups interface, so you need not change anything, just try to print in the program.</p> > </body> > </section> > <section> > <title>The GIMP</title> > <body> > > <p>Before starting, we have to emerge The Gimp's CUPS printing extentions. > </p> > > <pre caption="Emerging gimp-print"> ># <c>emerge gimp-print </c></pre> > > <p>Now, open up The GIMP, and open an existing picture, or just some blank pic, it really doesn't > matter because all we are looking for is the <i>File</i> menu. > Right click on the image and go to <i>File/Print</i> The dialog for printing should come up, > and when it does, click on new printer. > If your printer is not already listed, type in the name of your printer, then select your > printer type. Ok, you are now setup to print from The GIMP. Play with the settings and have some fun. > </p> > > </body> > </section> > </chapter> > > > <chapter> > <title>Using Linux as a Windows Compatible Print Server</title> > <body> > > <p>Linux makes a great print server, then again, it makes a great everything server. > The first thing to do is edit <path>/etc/samba/smb.conf</path> to fit your settings. > The <i>smb.conf</i> file contains all of the settings that will make your Linux box look > like a Windows NT server to any Windows machine. > I have included an very utilitarian example <i>smb.conf</i> below. Edit as needed to fit > your network environment. > </p> > > <pre caption = "Sample smb.conf"> ><c>[global]</c> > > <c>workgroup = YOUR_WORKGROUP</c> > <c>server string = Gentoo Linux Server</c> > <c>encrypt passwords = True</c> > <c>security = user</c> > <c>smb passwd file = /etc/samba/private/smbpasswd</c> > <c>log file = /var/log/samba/log.%m</c> > <c>socket options = IPTOS_LOWDELAY TCP_NODELAY</c> > <c>domain master = Yes</c> > <c>local master = Yes</c> > <c>preferred master = Yes</c> > <c>os level = 65</c> > <c>dns proxy = No</c> > <c>name resolve order = lmhosts host bcast</c> > <c>bind interfaces only = True</c> > <c>interfaces = eth0</c> > <c>hosts deny = ALL</c> > <c>hosts allow = 192.168.1.4 127.0.0.1 (list of allow hosts here) </c> > <c>debug level = 1</c> > <c>create mask = 0644</c> > <c>directory mask = 0755</c> > <c>level2 oplocks = True</c> > <c>read raw = no</c> > <c>write cache size = 262144</c> > ><c>[printers]</c> > <c>comment = All Printer</c> > <c>path = /var/spool/samba</c> > <c>browseable = no </c></pre> > > <p>Now that the SAMBA is configured, restart samba, go to your Windows machine > and install a network printer. Piece of cake, eh? > </p> > > </body> > </chapter> ></guide>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 22244
: 16649