slitaz-doc-wiki-data view pages/fr/guides/printer.txt @ rev 44

Update pages/fr folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun May 01 07:40:21 2011 +0000 (2011-05-01)
parents 7011c4a257d7
children
line source
1 ====== Impression ======
3 Le CUPS (Common Unix Printing System) gère les imprimantes connectées à l'ordinateur en local ou en réseau. Les imprimantes locales sont gérées par l'intermédiaire d'une connexion loopback (IP 127.0.0.1), une interface réseau virtuelle.
5 ===== Installation d'une imprimante réseau =====
7 Installez CUPS et ajoutez les utilisateurs au groupe //lp// pour avoir les autorisations d'accès aux périphériques. Cela peut être fait en tant que root dans un terminal:
9 <code>
10 # tazpkg get-install cups
11 # addgroup tux lp
12 </code>
14 En tant que root encore, personnalisez la configuration par défaut dans /etc/cupsd.conf :
15 <file>
16 # Administrator user group...
17 SystemGroup lp
19 # Restrict access to the admin pages...
21 Order allow,deny
22 Allow 127.0.0.1
25 # Restrict access to configuration files...
27 AuthType Default
28 Require user @SYSTEM
29 Order allow,deny
30 Deny From None
31 Allow From 127.0.0.1
32 </file>
34 Définissez le mot de passe administrateur pour CUPS et ajoutez un utilisateur avec les privilèges d'administration :
36 <code>
37 # lppasswd -g lp -a tux
38 </code>
40 Vous devriez maintenant être en mesure d'avoir accès à l'administration de CUPS via votre navigateur en entrant l'adresse ''<nowiki>http://localhost:631/</nowiki>''
42 Installez les pilotes d'imprimantes avec les paquets suivants :
44 - hplip : pour les imprimantes HP
45 - gutenprint : pour Canon, Epson, Lexmark, Sony, Olympus
46 - foomatic-db, foomatic-db-engine, foomatic-db-nonfree et foomatic-filters : plusieurs logiciels libres de pilotes d'impression
47 - ufr2 : pour les imprimantes Canon (pilotes supplémentaires)
48 - splix : pour Samsung
49 - cups-pdf : pour « l'impression » dans un document PDF
51 Par exemple, installez les pilotes d'imprimantes HP avec la commande suivante sous //root// :
53 <code>
54 # tazpkg get-install hplip
55 </code>
57 Vous pouvez maintenant ajouter une nouvelle imprimante dans l'interface du navigateur et sélectionner :
59 <nowiki>LPD/LPR Host or Printer (Unknown),
60 and add the address socket//192.168.2.1:9100</nowiki>
62 Si vous obtenez l'erreur "//Returning IPP client-error-document-format-not-supported for Print-Job in /var/log/cups/error.log//" ajoutez alors deux fichiers dans le répertoire /etc/cups. La méthode la plus simple est de lancer un éditeur de texte tel que Leafpad à partir d'un terminal root; démarrez le terminal et passez à l'utilisateur root.
64 * ''mime.convs'' (/etc/cups/mime.convs):
65 <file>
66 application/pdf application/postscript 33 pdftops
67 application/postscript application/vnd.cups-postscript 66 pstops
68 application/vnd.hp-HPGL application/postscript 66 hpgltops
69 application/x-cshell application/postscript 33 texttops
70 application/x-csource application/postscript 33 texttops
71 application/x-perl application/postscript 33 texttops
72 application/x-shell application/postscript 33 texttops
73 text/plain application/postscript 33 texttops
74 text/html application/postscript 33 texttops
75 image/gif application/vnd.cups-postscript 66 imagetops
76 image/png application/vnd.cups-postscript 66 imagetops
77 image/jpeg application/vnd.cups-postscript 66 imagetops
78 image/tiff application/vnd.cups-postscript 66 imagetops
79 image/x-bitmap application/vnd.cups-postscript 66 imagetops
80 image/x-photocd application/vnd.cups-postscript 66 imagetops
81 image/x-portable-anymap application/vnd.cups-postscript 66 imagetops
82 image/x-portable-bitmap application/vnd.cups-postscript 66 imagetops
83 image/x-portable-graymap application/vnd.cups-postscript 66 imagetops
84 image/x-portable-pixmap application/vnd.cups-postscript 66 imagetops
85 image/x-sgi-rgb application/vnd.cups-postscript 66 imagetops
86 image/x-xbitmap application/vnd.cups-postscript 66 imagetops
87 image/x-xpixmap application/vnd.cups-postscript 66 imagetops
88 image/x-sun-raster application/vnd.cups-postscript 66 imagetops
91 image/gif application/vnd.cups-raster 100 imagetoraster
92 image/png application/vnd.cups-raster 100 imagetoraster
93 image/jpeg application/vnd.cups-raster 100 imagetoraster
94 image/tiff application/vnd.cups-raster 100 imagetoraster
95 image/x-bitmap application/vnd.cups-raster 100 imagetoraster
96 image/x-photocd application/vnd.cups-raster 100 imagetoraster
97 image/x-portable-anymap application/vnd.cups-raster 100 imagetoraster
98 image/x-portable-bitmap application/vnd.cups-raster 100 imagetoraster
99 image/x-portable-graymap application/vnd.cups-raster 100 imagetoraster
100 image/x-portable-pixmap application/vnd.cups-raster 100 imagetoraster
101 image/x-sgi-rgb application/vnd.cups-raster 100 imagetoraster
102 image/x-xbitmap application/vnd.cups-raster 100 imagetoraster
103 image/x-xpixmap application/vnd.cups-raster 100 imagetoraster
104 image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
106 application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
107 </file>
109 * ''mime.types'' (/etc/cups/mime.types):
111 <file>
112 application/pdf pdf string(0,%PDF)
113 application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
114 contains(0,128,<1B>%-12345X) + \
115 (contains(0,4096,"LANGUAGE=POSTSCRIPT") \
116 contains(0,4096,"LANGUAGE = Postscript") \
117 contains(0,4096,"LANGUAGE = PostScript") \
118 contains(0,4096,"LANGUAGE = POSTSCRIPT") \
119 (contains(0,4096,<0a>%!) + \
120 !contains(0,4096,"ENTER LANGUAGE")))
121 application/vnd.hp-HPGL hpgl \
122 string(0,<1B>E<1B>%0B) \
123 string(0,<1B>%-1B) string(0,<201B>)\
124 string(0,BP;) string(0,IN;) string(0,DF;) \
125 string(0,BPINPS;) \
126 (contains(0,128,<1B>%-12345X) + \
127 (contains(0,4096,"LANGUAGE=HPGL") \
128 contains(0,4096,"LANGUAGE = HPGL")))
130 ########################################################################
131 #
132 # Image files...
133 #
135 image/gif gif string(0,GIF87a) string(0,GIF89a)
136 image/png png string(0,<89>PNG)
137 image/jpeg jpeg jpg jpe string(0,) &&\
138 (char(3,0xe0) char(3,0xe1) char(3,0xe2) char(3,0xe3)\
139 char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
140 char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
141 char(3,0xec) char(3,0xed) char(3,0xee) char(3,0xef))
142 image/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)
143 image/x-photocd pcd string(2048,PCD_IPI)
144 image/x-portable-anymap pnm
145 image/x-portable-bitmap pbm string(0,P1) string(0,P4)
146 image/x-portable-graymap pgm string(0,P2) string(0,P5)
147 image/x-portable-pixmap ppm string(0,P3) string(0,P6)
148 image/x-sgi-rgb rgb sgi bw icon short(0,474)
149 image/x-xbitmap xbm
150 image/x-xpixmap xpm ascii(0,1024) + string(3,"XPM")
151 #image/x-xwindowdump xwd string(4,<00000007>)
152 image/x-sun-raster ras string(0,<59a66a95>)
154 #image/fpx fpx
155 image/x-alias pix short(8,8) short(8,24)
156 image/x-bitmap bmp string(0,BM) && !printable(2,14)
157 image/x-icon ico
159 ########################################################################
160 #
161 # Text files...
162 #
164 application/x-cshell csh printable(0,1024) + string(0,#!) +\
165 (contains(2,80,/csh) contains(2,80,/tcsh))
166 application/x-perl pl printable(0,1024) + string(0,#!) +\
167 contains(2,80,/perl)
168 application/x-shell sh printable(0,1024) + string(0,#!) +\
169 (contains(2,80,/bash) contains(2,80,/ksh)\
170 contains(2,80,/sh) contains(2,80,/zsh))
171 application/x-csource c cxx cpp cc C h hpp \
172 printable(0,1024) + \
173 (string(0,/*) string(0,//)
174 string(0,#include) contains(0,1024,<0a>#include) \
175 string(0,#define) contains(0,1024,<0a>#define))
176 text/html html htm printable(0,1024) +\
177 (istring(0,"") istring(0,"))
178 text/plain txt printable(0,1024)
179 text/css css
182 ########################################################################
183 #
184 # RSS feed type...
185 #
187 application/rss+xml rss
190 ########################################################################
191 #
192 # CUPS-specific types...
193 #
195 application/vnd.cups-command string(0,'#CUPS-COMMAND')
196 application/vnd.cups-form string(0,"")
197 application/vnd.cups-pdf
198 application/vnd.cups-postscript
199 application/vnd.cups-ppd ppd string(0,"*PPD-Adobe:")
200 application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
201 application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
202 string(0,<1B>@) \
203 (contains(0,128,<1B>%-12345X) + \
204 (contains(0,4096,"LANGUAGE=PCL") \
205 contains(0,4096,"LANGUAGE = PCL")))
207 ########################################################################
208 #
209 # Raw print file support...
210 #
211 # Comment the following type to prevent raw file printing.
212 #
214 application/octet-stream
215 </file>
217 <note tip>Si à la fin de la procédure, l'imprimante ne fonctionne pas, le redémarrage du service cups ou de l'ordinateur peut dépanner.</note>
219 ====== Installation d'une imprimante USB Brother HL 2030 ======
221 Pour installer cups, hal-cups-utils, usbutils. En tant que root, tapez :
223 <code>
224 root@slitaz:# tazpkg get-install cups
225 root@slitaz:# tazpkg get-install hal-cups-utils
226 root@slitaz:# tazpkg get-install usbutils
227 </code>
229 Cups est utilisé pour gérer l'imprimante, hal-cups-utils permet à cups d'utiliser HAL pour les connexions d'imprimante et usbutils apporte l'utilitaire lsusb qui permet de savoir comment l'imprimante est connectée.
231 Ajoutez maintenant tux au groupe lp (imprimante). En tant que root, faire :
233 <code>
234 root@slitaz:#addgroup tux lp
235 </code>
237 Pour que l'interface web de cups puisse être correctement activée, il nous faut encore changer quelques points dans ///etc/cupsd.conf//.
239 <code>
240 root@slitaz:#leafpad /etc/cups/cupsd.conf
241 </code>
243 <file>
244 # Administrator user group...
245 SystemGroup lp
247 # Restrict access to the admin pages...
249 Order allow,deny
250 Allow 127.0.0.1
253 # Restrict access to configuration files...
255 AuthType Default
256 Require user @SYSTEM
257 Order allow,deny
258 Deny From None
259 Allow From 127.0.0.1
260 </file>
262 Pour modifier les droits sur l'imprimante, il faut connaître ses coordonnées de bus et de device. Pour cela, on fait sous root:
263 <code>
264 root@slitaz:#lsusb
265 </code>
267 On obtient une sortie du type:
268 <code>
269 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
270 Bus 001 Device 002: ID 04f9:0027 Brother Industries, Ltd HL-2030 Laser Printer
271 </code>
273 On peut alors changer les droits sur le fichier associé :
275 <code>
276 root@slitaz:#chmod 666 /dev/bus/usb/001/002
277 </code>
279 Et redémarrer ensuite cups:
280 <code>
281 root@slitaz:#/etc/init.d/cupsd start
282 </code>
284 Il faut ensuite configurer l'imprimante, en allant chercher sur le site openprinting le fichier ppd correspondant à ce modèle d'imprimante:
285 http://www.openprinting.org/printer/Brother/Brother-HL-2030 et ajouter aussi les paquets suivants: foomatic-filters foomatic-db foomatic-db-engine
287 <code>
288 root@slitaz:# tazpkg get-install foomatic-filters
289 root@slitaz:# tazpkg get-install foomatic-db
290 root@slitaz:# tazpkg get-install foomatic-db-engine
291 </code>
293 Redémarrez maintenant cups comme précédemment indiqué et avec midori, aller à l'adresse suivante: http://localhost:631
295 Cups demande alors :
297 - le login "root" (tux par défaut)
299 - le mot de passe correspondant.
301 Ensuite on va dans > imprimante > Add Printer > cliquer sur le nom de l'imprimante qui est reconnue et ne pas oublier d'indiquer le chemin dans la case Location taper : /dev/bus/usb/001/002 (dans mon cas)
303 Puis depuis l'interface web ppd de cups, installez la nouvelle imprimante en utilisant le fichier Brother-HL-2030-hl1250.ppd qui se trouve dans le compte de l'utilisateur. Il faut ensuite automatiser le démarrage du démon cupsd à chaque redémarrage du système en utilisant les Outils Système dans le menu, puis boite de contrôle, puis Initialisation et ajouter **//cupsd//** à la section 'Run daemons' :
305 <file>
306 dbus hald firewall slim cupsd
307 </file>
309 ====== Cas d'une imprimante HP ======
311 <note>Ceci est dans le cas d'une installation propre de SliTaz GNU/Linux cooking-20100314</note>
313 - Une fois l'imprimante branchée et allumée, lancez : <code>
314 # su root
315 # tazpkg recharge
316 # tazhw setup printer</code>
317 - Installez seulement hplip et hal-cups-utils
318 - L'imprimante devrait apparaître dans la liste des imprimantes s'affichant dans le cadre de cette commande. L'utilitaire tentera alors d'ouvrir les pages d'administration CUPS dans Midori (à http://localhost:631).
319 - Sur mon système, l'imprimante n'apparaît pas dans le navigateur sous la rubrique "Find printers" et j'ai une erreur 403 lorsque je tente d'ajouter une imprimante via le navigateur.
320 - Au lieu de cela, exécutez <code> hp-setup </code> et suivez les instructions. La page de test doit s'imprimer correctement. L'imprimante devrait également apparaître dans la liste des imprimantes dans les applications (comme l'éditeur de texte) et apparaîtra également dans la liste des imprimantes sur les pages du navigateur CUPS, bien que dans mon cas, il n'est pas encore possible d'apporter de modifications à l'imprimante.
322 ===== Installer une imprimante HP All-In-One Printer/Scanner =====
324 === Preparation & paquets ===
326 Allumez le scanner avant d'installer les paquets suivants :
328 * xsane
329 * sane-backends
330 * libusb
331 * libusb-compat
332 * usbtools
333 * usbutils
335 <note tip>Vous pouvez automatiser le processus avec la commande Bash suivante en tant qu'utilisateur root :
336 <code>for PKG in xsane sane-backends-libusb libusb-compat usbtools usbutils; do
337 tazpkg get-install $PKG
338 done</code>
339 </note>
341 === Détection ===
343 Avec ces paquets installés, utilisez le Hardware Detection Tool (Menu> Outils système> Détection matérielle et des pilotes),
344 Cliquez sur le bouton Scanner
346 Si votre scanner ne s'affiche pas immédiatement, entrez none dans le set-up, le device du scanner doit être maintenant affiché en texte violet, par exemple:
348 <file>/dev/bus/usb/004/002</file>
350 === Vérifier les permissions ===
352 Votre scanner doit faire partie dux groupe scanner avec les permissions 666
354 <code>$ crw-rw-rw- 1 root scanner 189, 385 Jun 22 19:44 /dev/bus/usb/0 </code>
356 Répondre y pour démarrer le scanner
358 Un avertissement apparaît à propos de l'exécution du scanner en tant que root
360 Cliquez sur le bouton continuer à vos risques et périls
362 Accepter la license
364 Xsane devrait s'ouvrir et fonctionner !
366 l'utilisateur //tux// est automatiquement ajouté au groupe scanner, de sorte que tux peut scanner, mais vous ne pourrez pas scanner avec un autre utilisateur tant que vous ne l'aurez pas ajouté au groupe scanner. Faites-le avec la commande suivante (en tant que //root//)_:
368 <code># addgroup //username// scanner</code>
370 ===== Liens =====
372 * http://www.openprinting.org/printers
374 ===== Imprimer avec Abiword =====
376 Pour que Abiword puisse utiliser notre imprimante, on fait l'ultime commande suivante:
378 <code>lpoptions -d le_nom_de_ma_super_imprimante</code>
380 On redémarre ensuite et normalement c'est bon.
382 **Franciser le choix du format de papier par défaut dans abiword :**
384 Aller en root dans :
385 /usr/share/abiword-2.6/templates
386 et faire une copie de normal.awt en normalold.awt (au cas ou !!)
388 <code># cp normal.awt normalold.awt</code>
390 ensuite
392 <code># cp normal.awt-fr_FR normal.awt</code>
394 ===== TODO =====
396 * Imprimante parallèle
397 ----
398 \\
399 ^ Section Révision de la page ^^
400 |Qualité| Bonne |
401 |Revue| |
402 |Priorité| |
403 |Problèmes| |
404 |Comment améliorer| |
407 \\
408 ----