Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:guides:printer [2010/10/15 17:22] – add usb printer (fr translation) linea | en:guides:printer [2026/10/14 23:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Printing ====== | ====== Printing ====== | ||
| - | The CUPS (Common Unix Printing System) | + | SliTaz prints with CUPS (Common Unix Printing System). It manages printers connected to the computer |
| - | ===== Installing a Network Printer | + | ===== Install CUPS ===== |
| - | Install | + | As root, install |
| < | < | ||
| - | # tazpkg get-install | + | # spk-add cups cups-filters gutenprint |
| - | # addgroup tux lp | + | # trame service enable cupsd |
| </ | </ | ||
| - | Again as root, customise the default configuration in /etc/cupsd.conf: | + | The service starts at once. To check or restart it by hand: |
| - | + | ||
| - | < | + | |
| - | # Administrator user group... | + | |
| - | SystemGroup lp | + | |
| - | + | ||
| - | # Restrict access to the admin pages... | + | |
| - | + | ||
| - | Order allow, | + | |
| - | Allow 127.0.0.1 | + | |
| - | + | ||
| - | + | ||
| - | # Restrict access to configuration files... | + | |
| - | + | ||
| - | AuthType Default | + | |
| - | Require user @SYSTEM | + | |
| - | Order allow, | + | |
| - | Deny From None | + | |
| - | Allow From 127.0.0.1 | + | |
| - | </ | + | |
| - | + | ||
| - | Set the administrative password for CUPS and add an administrative user: | + | |
| < | < | ||
| - | # lppasswd -g lp -a tux | + | # / |
| </ | </ | ||
| - | You should now be able to have access to the CUPS administration through your browser by entering the address ''< | + | ===== Drivers ===== |
| - | Install | + | Pick the package matching your printer: |
| - | - hplip : for HP printers | + | * **gutenprint** and **foomatic-db** (with **foomatic-db-engine** and **foomatic-filters**): |
| - | - gutenprint | + | * **hplip**: HP printers. |
| - | - foomatic-db, foomatic-db-engine, foomatic-db-nonfree | + | * **cnijfilter2**: |
| - | | + | * **ufr2**: Canon laser printers (extra drivers). |
| - | - splix: for Samsung | + | * **cups-pdf**: a virtual printer that "prints" to a PDF file. |
| - | - cups-pdf: | + | |
| - | For example, install the HP printer | + | Example for an HP printer: |
| - | < | + | |
| - | # tazpkg get-install hplip | + | |
| - | </ | + | |
| - | + | ||
| - | Now you add a new printer in the browser interface and choose: | + | |
| - | + | ||
| - | < | + | |
| - | and add the address socket// | + | |
| - | + | ||
| - | If you get the error, "// | + | |
| - | + | ||
| - | * '' | + | |
| - | < | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | text/ | + | |
| - | text/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | + | ||
| - | + | ||
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | + | ||
| - | application/ | + | |
| - | </ | + | |
| - | + | ||
| - | * '' | + | |
| - | + | ||
| - | < | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | contains(0, | + | |
| - | (contains(0, | + | |
| - | contains(0, | + | |
| - | contains(0, | + | |
| - | contains(0, | + | |
| - | (contains(0, | + | |
| - | !contains(0, | + | |
| - | application/ | + | |
| - | string(0,< | + | |
| - | string(0,< | + | |
| - | string(0, | + | |
| - | string(0, | + | |
| - | (contains(0, | + | |
| - | (contains(0, | + | |
| - | contains(0, | + | |
| - | + | ||
| - | ######################################################################## | + | |
| - | # | + | |
| - | # Image files... | + | |
| - | # | + | |
| - | + | ||
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | (char(3, | + | |
| - | char(3, | + | |
| - | char(3, | + | |
| - | char(3, | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | # | + | |
| - | image/ | + | |
| - | + | ||
| - | # | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | image/ | + | |
| - | + | ||
| - | ######################################################################## | + | |
| - | # | + | |
| - | # Text files... | + | |
| - | # | + | |
| - | + | ||
| - | application/ | + | |
| - | (contains(2, | + | |
| - | application/ | + | |
| - | contains(2, | + | |
| - | application/ | + | |
| - | (contains(2, | + | |
| - | contains(2, | + | |
| - | application/ | + | |
| - | printable(0, | + | |
| - | (string(0,/ | + | |
| - | string(0,# | + | |
| - | string(0,# | + | |
| - | text/ | + | |
| - | (istring(0,"" | + | |
| - | text/ | + | |
| - | text/ | + | |
| - | + | ||
| - | + | ||
| - | ######################################################################## | + | |
| - | # | + | |
| - | # RSS feed type... | + | |
| - | # | + | |
| - | + | ||
| - | application/ | + | |
| - | + | ||
| - | + | ||
| - | ######################################################################## | + | |
| - | # | + | |
| - | # CUPS-specific types... | + | |
| - | # | + | |
| - | + | ||
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | application/ | + | |
| - | string(0,< | + | |
| - | (contains(0, | + | |
| - | (contains(0, | + | |
| - | contains(0, | + | |
| - | + | ||
| - | ######################################################################## | + | |
| - | # | + | |
| - | # Raw print file support... | + | |
| - | # | + | |
| - | # Comment the following type to prevent raw file printing. | + | |
| - | # | + | |
| - | + | ||
| - | application/ | + | |
| - | </ | + | |
| - | + | ||
| - | <note tip>If at the end of the procedures the printer is not working, restarting the service or computer may help.</ | + | |
| - | + | ||
| - | ===== Installing an USB Brother HL 2030 Printer ===== | + | |
| - | + | ||
| - | To install cups, hal-cups-utils, | + | |
| < | < | ||
| - | root@slitaz: | + | # spk-add hplip |
| - | root@slitaz:# | + | |
| - | root@slitaz:# | + | |
| </ | </ | ||
| - | Cups is used to manage | + | Search |
| - | Now we can add tux to the lp (printer) group. As root, we do: | + | ===== Add a printer |
| - | <code> | + | Open the CUPS web interface in a browser at '' |
| - | root@slitaz:# addgroup tux lp | + | |
| - | </code> | + | |
| - | For the web interface of cups to be properly activated, we still need to change | + | For a network printer that has no detected entry, choose |
| < | < | ||
| - | root@slitaz:# leafpad | + | socket://192.168.2.1: |
| </ | </ | ||
| - | < | + | For a USB printer, plug it in and power it on: it appears in the list of local printers. '' |
| - | # Administrator user group... | + | |
| - | | + | |
| - | + | ||
| - | # Restrict access to the admin pages... | + | |
| - | + | ||
| - | Order allow, | + | |
| - | Allow 127.0.0.1 | + | |
| - | + | ||
| - | + | ||
| - | # Restrict access to configuration files... | + | |
| - | + | ||
| - | | + | |
| - | | + | |
| - | Order allow, | + | |
| - | Deny From None | + | |
| - | Allow From 127.0.0.1 | + | |
| - | </ | + | |
| - | To modify permissions on the printer | + | If a printer |
| - | < | + | ===== Scanning ===== |
| - | root@slitaz:# | + | |
| - | </ | + | |
| - | And get the following output: | + | For a scanner, install **sane-backends** and the **xsane** application: |
| < | < | ||
| - | Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | + | # spk-add sane-backends xsane |
| - | Bus 001 Device 002: ID 04f9:0027 Brother Industries, Ltd HL-2030 Laser Printer | + | |
| </ | </ | ||
| - | You can now change the permissions on the associated file: | + | This is all the 5.1 handbook says about scanning; if your scanner |
| - | + | ||
| - | < | + | |
| - | root@slitaz:# | + | |
| - | </ | + | |
| - | + | ||
| - | And then start cups: | + | |
| - | + | ||
| - | < | + | |
| - | root@slitaz:# | + | |
| - | </ | + | |
| - | + | ||
| - | We can now configure the printer and fetch the openprinting ppd file for that printer | + | |
| - | model: http:// | + | |
| - | packages: foomatic-filters foomatic-db foomatic-db-engine: | + | |
| - | + | ||
| - | < | + | |
| - | root@slitaz:# | + | |
| - | root@slitaz:# | + | |
| - | root@slitaz:# | + | |
| - | </ | + | |
| - | + | ||
| - | Now we can restart cups and point midori to http:// | + | |
| - | + | ||
| - | Cups then asks for: | + | |
| - | + | ||
| - | - The login " | + | |
| - | + | ||
| - | - The corresponding password. | + | |
| - | + | ||
| - | Then navigate to > Printers > Add Printer > click on the printer name that you recognize and do not forget to indicate the path in the connection box: /// | + | |
| - | + | ||
| - | Then go to the web interface of cups ppd and install the new printer using the file Brother HL-2030-hl1250.ppd located in the user's account. Now you can automatically restart cupsd each time you start the system by using System Tools (in the menu) -> Control box -> Initialization and allow the cupsd daemon to run by adding it to the 'Run daemons' | + | |
| - | + | ||
| - | < | + | |
| - | dbus hald firewall slim cupsd | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Installing a HP Printer ===== | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | - With the printer plugged in and powered on, run < | + | |
| - | # su root | + | |
| - | # tazpkg recharge | + | |
| - | # tazhw setup printer</ | + | |
| - | - Install only hplip and hal-cups-utils | + | |
| - | - The printer should show up in the list of printers displayed as part of this command. It will then attempt to open the CUPS admin pages in Midori (at http:// | + | |
| - | - On my system, the printer does not show up in the browser under 'Find printers' | + | |
| - | - Instead, run < | + | |
| - | + | ||
| - | ===== Installing a HP All-In-One Printer/ | + | |
| - | + | ||
| - | + | ||
| - | === Preparation & Packages === | + | |
| - | + | ||
| - | Power on the scanner before installing the following packages: | + | |
| - | + | ||
| - | * xsane | + | |
| - | * sane-backends | + | |
| - | * libusb | + | |
| - | * libusb-compat | + | |
| - | * usbtools | + | |
| - | * usbutils | + | |
| - | + | ||
| - | <note tip>You can automate the process with the following Bash command as //root// user: | + | |
| - | < | + | |
| - | tazpkg get-install $PKG | + | |
| - | done</ | + | |
| - | </ | + | |
| - | + | ||
| - | === Detection === | + | |
| - | + | ||
| - | With those packages installed, use the Hardware Detection Tool (Menu > System Tools > Hardware Detection And Drivers) | + | |
| - | Click on Scanner button | + | |
| - | + | ||
| - | If your scanner | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | === Verify Permissions === | + | |
| - | + | ||
| - | Your scanner must be in scanner group with 666 permissions | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | Reply y to start scanner | + | |
| - | Warning pops up about running scanner as root | + | |
| - | Click continue at your own risk button | + | |
| - | Agree to license | + | |
| - | + | ||
| - | Xsane should open and be working! | + | |
| - | + | ||
| - | The //tux// user is automatically added to scanner group, so tux may scan, but if you run under another user name that user can't scan until you add them to //scanner// group. Do this with the command (as // | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | ===== Links ==== | + | |
| - | + | ||
| - | * http:// | + | |
| - | + | ||
| - | ===== TODO ===== | + | |
| - | * Parallel Printer | + | ===== See also ===== |
| - | ---- | + | * [[https://doc.slitaz.org/ |
| - | \\ | + | |
| - | ^ Page Review Section | + | |
| - | |Quality| Low | | + | |
| - | |Review| Major Updates | + | |
| - | |Priority| Medium | | + | |
| - | |Problems| add a [[http://forum.slitaz.org|forum post link]]| | + | |
| - | |::: | OR add a [[http://labs.slitaz.org/ | + | |
| - | |How to Improve| Suggest briefly| | + | |
| - | |::: | | | + | |
| - | \\ | ||
| - | ---- | ||