Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 2983 Details for
Bug 6313
New Setup guide for printing under Gentoo
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
XML source for print documentation
gentoo-printing-1.0.2.xml (text/plain), 12.19 KB, created by
John Davis (zhen) (RETIRED)
on 2002-08-11 00:27:54 UTC
(
hide
)
Description:
XML source for print documentation
Filename:
MIME Type:
Creator:
John Davis (zhen) (RETIRED)
Created:
2002-08-11 00:27:54 UTC
Size:
12.19 KB
patch
obsolete
><?xml version='1.0'?> ><guide> ><title>Gentoo Printing Guide</title> ><author title="Author"><mail link="davisjp@muc.edu"> > John P. Davis</mail> ></author> ><author title="Copyeditor"><mail link="sunflare@gentoo.org">Phil Bordelon</mail> ></author> > ><abstract>A comprehensive printing guide for Gentoo Linux. This document covers both local and network printing.</abstract> > ><version>1.0.2</version> ><date>8 August 2002</date> > ><chapter> ><title>Local Printing Using CUPS</title> ><section> > <title>Installation Using CUPS</title> ><body> > ><p>Setting up printing in Gentoo Linux is relatively easy, as all of the packages required can be found in the portage tree as of 8 August 2002. All that we have to do is configure the actual printer and make sure that it interprets Postscript correctly. The first step is installing the necessary software.</p> > ><note>The next steps assume that we are setting up printing in GNOME2. This may work in KDE, as CUPS is environment-independent. TODO: guide for setup in KDE. </note> > ><pre> ># <c>emerge net-print/cups</c> ># <c>emerge gnome-base/gnome-print</c> ># <c>emerge gnome-base/libgnomeprint</c> ># <c>emerge media-gfx/gimp-print</c> ># <c>emerge net-print/gimp-print-cups</c> ></pre> > ><p>Since the packages are now installed with their appropriate dependencies, it is time to install the printer itself.</p> > > <note>This document deals mostly with USB Hewlett Packard printers, but configuring a parallel-port printer is not much different from USB configuration. Non-HP printers are not covered as of yet, so finding and installing drivers for them will not be an identical process.</note> > ><p>Unless you already have USB printer support compiled into the kernel, it will have to be compiled in. You need to have USB core support and USB printer support enabled either as modules or built in. I chose to modularize both because I can <c>lsmod</c> and see that the support is actually up and running, but that is just personal preference. </p> > > <impo>If you are using a parallel port printer, make sure to enable the parallel port kernel options instead of the USB options. </impo> > > <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>. </note> > ><p>Now that the appropriate kernel options are installed, it is time to see if the printer is detected and dealt with appropriately. Once everything is restarted, load the printer modules. </p> > > <note>If you have USB built into your kernel, you don't have to load the USB modules. If you are using a parallel port printer, substitute the appropriate modules as needed.</note> > ><pre> ># <c>insmod usbcore</c> ># <c>insmod 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 is detected. </p> > ><pre> ># <c>tail /var/log/messages</c> ></pre> > ><p>You should see something like this: </p> > ><pre> ><c>hub.c: USB new device connect on bus2/2, assigned device number 2 </c> ><c>printer.c: usblp0: USB bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1104 </c> ></pre> > > <note>If you are using a parallel port printer, make sure that it is plugged in before you reboot. Once the system is up, issue a <c>dmesg</c> and look for evidence of the kernel detecting your printer.</note> > ><p>Before setting up the printer using CUPS, it is possible to test your printer using <i>cat</i>. </p> > ><pre> ># <c>touch test.txt</c> ># <c>echo "Hello World" > test.txt</c> ># <c>cat test.txt > /dev/usb/lp0 </c> > ><i> Alternatively, for parallel port printers: </i> ># <c>cat test.txt > /dev/lp0 </c> ></pre> > ></body> ></section> > ><section> > <title>PPD File Configuration</title> ><body> ><p>Now it is time to configure the printer and CUPS. If you are using an HP Inkjet printer, it is necessary to install the <c>hpijs</c> printer driver. This driver handles all of the Postscript interpretation necessary to make the HP printer work. If you are using a non-HP printer, it may be necessary to locate the third party drivers for it. </p> > ><note>The <c>hpijs</c> driver is for HP Inkjet printers only. 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, skip down below to the configuration process.</note> > ><pre> ># <c>emerge net-print/hpijs</c> ></pre> > > <impo>The documentation from HP for the <c>hpijs</c> driver is in <path>/usr/share/doc/hpijs-1.1</path>. It is <i>highly</i> recommend reading. </impo> > ><p> 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. The foomatic configuration scripts are available <uri link="http://www.linuxprinting.org/download/foomatic">here</uri>. There is an ebuild in development for Gentoo, but it is not in the current Portage tree. Once foomatic is configured and installed, issue these commands to configure your printer, then move the PPD to the correct location. This example uses the hpijs driver for an HP printer. </p> > ><note>For the printer ID, foomatic is expecting an ID out of its database located in <path>/usr/share/foomatic/db/source/printer</path>. You must find your printer ID, and use its exact name. Remember that it is case sensitive. </note> > ><pre> ># <c>foomatic-configure -s cups -p printer ID -c print_device -n queue name -d hpijs </c> ># <c>mv /etc/foomatic/your.new.ppd /etc/cups/ppd </c> ></pre> > > <impo>If you are using a non-HP printer, you will still be able to use foomatic to generate your PPD. 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> ></section> > ><section> > <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 machine, which makes it very handy. </p> > > <impo>CUPS has a builtin 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> ># <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 and point it to <uri link="http://localhost:631">here</uri>. Hopefully, you will be greeted with the CUPS configuration mainscreen. Click on the <i>administration</i> tab at the top of the page, and enter <i>root</i> for the username and your root password for the password. Once authenticated, click on the <i>Add Printer</i> tab under the <i>printers</i> section. Enter the necessary name, description, and location of your printer. You must make your printer name exactly the same name of your printer queue that you specified for foomatic. You now need to select the device that you printer is connected to. Select the make of the printer, and continue on. On the next page choose your printer from the list. For example, I have a HP Deskjet 952C, so I would pick the <i>HP DeskJet 900 Series, CUPS+GIMP-print v4.2.1 (en)</i>. Configuration is done! Click on the name of your printer, then try printing a test page. Voila, your printer is setup is completed!</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> ></section> ></chapter> > ><chapter> > <title>Configuring The GIMP, OpenOffice.org1.0, and Abiword to print using CUPS.</title> ><section> > <title>The GIMP</title> ><body> ><p>First, let's setup The GIMP, just because it is cool and worth it. 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> > ><section> > <title>OpenOffice.org1.0</title> ><body> ><p>Printing with OpenOffice.org1.0 is not much more difficult. Goto <path>OpenOffice.org1.0/program </path>, and run <c>spadmin</c>. Make a new printer, and when presented with the <i>Choose a Driver</i> screen, click on <i>import</i> and browse to the location of your printer's PPD In our case, it would be <path>/etc/cups/ppd</path>. Use the default print commands, name the printer, set it as default, and you are ready to go! Start OpenOffice.org1.0 and go to the print screen, and select your printer. Print a test page, and you are done. </p> ></body> ></section> > ><section> > <title>Abiword</title> ><body> > > <warn>Abiword segfaults and crashes with CUPS-1.1.15-r2. It is recommended to go back to the .14 series as that will fix the problem.</warn> > ><p>TODO: add Abiword support.</p> ></body> ></section> > ><p>Local printing is now complete, now to add network support. </p> > ></chapter> > ><chapter> > <title>Network printing using CUPS and SAMBA</title> ><section> > <title>Printing to a Windows Printer from a Linux Machine</title> ><body> ><p>First, SAMBA has to be installed for the next two network printing options to work. </p> > ><pre> ># <c>emerge net-fs/samba</c> ></pre> > ><note>For more information on SAMBA, the official SAMBA HOWTO is located <uri link="http://www.tldp.org/HOWTO/SMB-HOWTO.html">here</uri> </note> > ><p> First, we use <i>foomatic</i> to generate the PPD for the remote printer. Don't forget to check if your printer is compatible with Linux or not at the <uri link="http://www.linuxprinting.org/printer_list.cgi">linuxprinting.org</uri> printer database. Now, we tell <i>foomatic</i> where and what the printer is, and then move the generated PPD to the correct location. </p> > ><pre> ># <c>foomatic-configure -s cups -p printer ID -c smb://user:password@server/share -n queue name -d hpijs </c> ># <c>mv /etc/foomatic/your.new.ppd /etc/cups/ppd </c> ></pre> > ><p>Now, point your favorite web browser <uri link="http://localhost:631">here</uri> to bring up the CUPS configuration GUI. Follow the above steps to add a printer, but this time, when asked what port the printer is on, specify <i>smb://user:password@server/share</i>. This will point CUPS to the printer on the Windows machine. </p> ></body> ></section> > ><section> > <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> ><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> ></section> ></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 6313
: 2983 |
3039