PDA

View Full Version : CUPS!


josephdrivein
01-02-2005, 18:45
Ho sempre ritenuto che stampare da linux fosse quasi impossibile, questo è un motivo fondamentale che mi costringe a sprecare spazio con una partizione win.

Ho una HP LaserJet 1005 (http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1005) , che su linuxprinting.org (http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1005) è data come praticamente funzionante su linux.

Ho installato cups (uso Debian Sarge), per la precisione qsti pacchetti: cupsys cupsys-client libcupsimage2 libslp1 xpdf-common xpdf-utils

Ho scaricato e compilato (tutto da root) il mio driver ( foo2zjs (http://foo2zjs.rkkda.com/) )

Quando accendo la stampante (subito dopo il setup) carico il firmware con cat /usr/share/foo2zjs/firmware/sihp1005.dl > /dev/lp0

Ho aggiunto la stampante, questa è la configurazione: (/etc/cups/printers.conf)
# Printer configuration file for CUPS v1.1.23
# Written by cupsd on Tue 01 Feb 2005 07:37:08 PM CET
<DefaultPrinter laserjet>
Info HP LaserJet 1005
Location /dev/lp0
DeviceURI parallel:/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

Mi pare tutto a posto tranne quel "Location" dove ho messo /dev/lp0 ma sembra solo descrittivo a leggere la documentazione... :confused:

Tuttavia se dò
lp to-build.txt
da riga di comando tutto ok (job aggiunto) ma non stampa. Dal web mi dice "aborted", se lo riavvio Error:
client-error-not-possible
Su /var/log/cups/error_log trovo questo:

D [01/Feb/2005:19:37:58 +0100] AcceptClient: 5 from localhost:631.
D [01/Feb/2005:19:37:58 +0100] ReadClient: 5 POST / HTTP/1.1
D [01/Feb/2005:19:37:58 +0100] ProcessIPPRequest: 5 status_code=1
D [01/Feb/2005:19:37:58 +0100] ReadClient: 5 POST / HTTP/1.1
D [01/Feb/2005:19:37:58 +0100] ProcessIPPRequest: 5 status_code=1
D [01/Feb/2005:19:37:58 +0100] ReadClient: 5 POST / HTTP/1.1
D [01/Feb/2005:19:37:58 +0100] ProcessIPPRequest: 5 status_code=0
D [01/Feb/2005:19:37:58 +0100] AcceptClient: 7 from localhost:631.
D [01/Feb/2005:19:37:58 +0100] CloseClient: 5
D [01/Feb/2005:19:37:58 +0100] ReadClient: 7 POST /printers/laserjet HTTP/1.1
D [01/Feb/2005:19:37:58 +0100] print_job: auto-typing file...
D [01/Feb/2005:19:37:58 +0100] print_job: request file type is text/plain.
D [01/Feb/2005:19:37:58 +0100] check_quotas: requesting-user-name = 'root'
D [01/Feb/2005:19:37:58 +0100] print_job: requesting-user-name = 'root'
I [01/Feb/2005:19:37:58 +0100] Adding start banner page "none" to job 12.
I [01/Feb/2005:19:37:58 +0100] Adding end banner page "none" to job 12.
I [01/Feb/2005:19:37:58 +0100] Job 12 queued on 'laserjet' by 'root'.
D [01/Feb/2005:19:37:58 +0100] Job 12 hold_until = 0
D [01/Feb/2005:19:37:58 +0100] StartJob(12, 0x80b0730)
D [01/Feb/2005:19:37:58 +0100] StartJob() id = 12, file = 0/1
D [01/Feb/2005:19:37:58 +0100] job-sheets=none,none
D [01/Feb/2005:19:37:58 +0100] banner_page = 0
D [01/Feb/2005:19:37:58 +0100] StartJob: argv = "laserjet","12","root","to-build.txt","1","","/var/spool/cups/d00012-001"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[0]="PATH=/usr/lib/cups/filter:/bin:/usr/bin"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[1]="SOFTWARE=CUPS/1.1"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[2]="USER=root"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[3]="CHARSET=iso-8859-1"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[4]="LANG=en_US"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[5]="TZ=Europe/Rome"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[6]="PPD=/etc/cups/ppd/laserjet.ppd"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[7]="CUPS_SERVERROOT=/etc/cups"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[8]="RIP_MAX_CACHE=8m"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[9]="TMPDIR=/var/spool/cups/tmp"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[10]="CONTENT_TYPE=text/plain"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[11]="DEVICE_URI=parallel:/dev/lp0"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[12]="PRINTER=laserjet"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[13]="CUPS_DATADIR=/usr/share/cups"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[14]="CUPS_FONTPATH=/usr/share/cups
/fonts"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[15]="CUPS_SERVER=localhost"
D [01/Feb/2005:19:37:58 +0100] StartJob: envp[16]="IPP_PORT=631"
D [01/Feb/2005:19:37:58 +0100] StartJob: statusfds = [ 5 8 ]
D [01/Feb/2005:19:37:58 +0100] StartJob: filterfds[1] = [ 9 -1 ]
D [01/Feb/2005:19:37:58 +0100] StartJob: filter = "/usr/lib/cups/filter/texttops
"
D [01/Feb/2005:19:37:58 +0100] StartJob: filterfds[0] = [ 10 11 ]
D [01/Feb/2005:19:37:58 +0100] start_process("/usr/lib/cups/filter/texttops", 0x
bffefcb0, 0xbffef020, 9, 11, 8)
I [01/Feb/2005:19:37:58 +0100] Started filter /usr/lib/cups/filter/texttops (PID
2162) for job 12.
D [01/Feb/2005:19:37:58 +0100] StartJob: filter = "/usr/lib/cups/filter/pstops"
D [01/Feb/2005:19:37:58 +0100] StartJob: filterfds[1] = [ 9 12 ]
D [01/Feb/2005:19:37:58 +0100] start_process("/usr/lib/cups/filter/pstops", 0xbf
fefcb0, 0xbffef020, 10, 12, 8)
I [01/Feb/2005:19:37:58 +0100] Started filter /usr/lib/cups/filter/pstops (PID 2
163) for job 12.
D [01/Feb/2005:19:37:58 +0100] StartJob: filter = "/usr/lib/cups/filter/foomatic-rip"
D [01/Feb/2005:19:37:58 +0100] StartJob: filterfds[0] = [ 10 11 ]
D [01/Feb/2005:19:37:58 +0100] start_process("/usr/lib/cups/filter/foomatic-rip", 0xbffefcb0, 0xbffef020, 9, 11, 8)
I [01/Feb/2005:19:37:58 +0100] Started filter /usr/lib/cups/filter/foomatic-rip(PID 2164) for job 12.
D [01/Feb/2005:19:37:58 +0100] StartJob: backend = "/usr/lib/cups/backend/parallel"
D [01/Feb/2005:19:37:58 +0100] StartJob: filterfds[1] = [ -1 9 ]
D [01/Feb/2005:19:37:58 +0100] start_process("/usr/lib/cups/backend/parallel", 0xbffefcb0, 0xbffef020, 10, 9, 8)
I [01/Feb/2005:19:37:58 +0100] Started backend /usr/lib/cups/backend/parallel (PID 2165) for job 12.
D [01/Feb/2005:19:37:58 +0100] ProcessIPPRequest: 7 status_code=0
E [01/Feb/2005:19:37:58 +0100] PID 2164 stopped with status 22!
D [01/Feb/2005:19:37:58 +0100] [Job 12] /usr/lib/cups/filter/foomatic-rip: No such file or directory
D [01/Feb/2005:19:37:58 +0100] CloseClient: 7
D [01/Feb/2005:19:37:58 +0100] [Job 12] Page = 595x842; 12,12 to 583,830
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->num_fonts = 35
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[0] = AvantGarde-Book
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[1] = AvantGarde-BookOblique
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[2] = AvantGarde-Demi
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[3] = AvantGarde-DemiOblique
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[4] = Bookman-Demi
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[5] = Bookman-DemiItalic
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[6] = Bookman-Light
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[7] = Bookman-LightItalic
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[8] = Courier
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[9] = Courier-Bold
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->num_fonts = 35
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[0] = AvantGarde-Book
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[1] = AvantGarde-BookOblique
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[2] = AvantGarde-Demi
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[3] = AvantGarde-DemiOblique
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[4] = Bookman-Demi
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[5] = Bookman-DemiItalic
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[6] = Bookman-Light
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[7] = Bookman-LightItalic
D [01/Feb/2005:19:37:58 +0100] [Job 12] ppd->fonts[8] = Courier
D [01/Feb/2005:19:37:58 +0100] [Job 12] Page = 595x842; 12,12 to 583,830
D [01/Feb/2005:19:37:58 +0100] [Job 12] slowcollate=0, slowduplex=0, sloworder=0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%BoundingBox: 0 0 595 842
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Creator: texttops/CUPS v1.1.23
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%CreationDate: Tue 01 Feb 2005 07:37:58 PM CET
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Title: to-build.txt
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%For: root
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Pages: (atend)
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%DocumentNeededResources: font Courier-Bold
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%+ font Courier
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%DocumentSuppliedResources: procset texttops 1.1 0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%+ font Courier-Bold
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%+ font Courier
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%EndComments
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%BeginProlog
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%BeginResource: font Courier-Bold
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%CreationDate: Wed Dec 22 1999
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%EndResource
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%BeginResource: font Courier
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%CreationDate: Wed Dec 22 1999
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%EndResource
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%BeginResource: procset texttops 1.10
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%EndResource
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%EndProlog
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 1 1
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 1 1
D [01/Feb/2005:19:37:58 +0100] [Job 12] pw = 571.0, pl = 818.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageTop = 830.0, PageBottom = 12.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageWidth = 595.0, PageLength = 842.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 2 2
D [01/Feb/2005:19:37:58 +0100] [Job 12] pw = 571.0, pl = 818.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageTop = 830.0, PageBottom = 12.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageWidth = 595.0, PageLength = 842.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 3 3
D [01/Feb/2005:19:37:58 +0100] [Job 12] pw = 571.0, pl = 818.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageTop = 830.0, PageBottom = 12.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageWidth = 595.0, PageLength = 842.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 4 4
D [01/Feb/2005:19:37:58 +0100] [Job 12] pw = 571.0, pl = 818.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageTop = 830.0, PageBottom = 12.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageWidth = 595.0, PageLength = 842.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Page: 5 5
D [01/Feb/2005:19:37:58 +0100] [Job 12] pw = 571.0, pl = 818.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0

Avanti così per tutte le pagine del file poi alla fine:

D [01/Feb/2005:19:37:58 +0100] [Job 12] PageLeft = 12.0, PageRight = 583.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageTop = 830.0, PageBottom = 12.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] PageWidth = 595.0, PageLength = 842.0
D [01/Feb/2005:19:37:58 +0100] [Job 12] 0 %%Trailer
D [01/Feb/2005:19:37:58 +0100] [Job 12] Saw Trailer!
D [01/Feb/2005:19:37:58 +0100] [Job 12] Saw EOF!
D [01/Feb/2005:19:37:58 +0100] UpdateJob: job 12, file 0 is complete.
D [01/Feb/2005:19:37:58 +0100] CancelJob: id = 12
D [01/Feb/2005:19:37:58 +0100] StopJob: id = 12, force = 0
D [01/Feb/2005:19:37:58 +0100] StopJob: printer state is 3
D [01/Feb/2005:19:38:03 +0100] AcceptClient: 5 from localhost:631.
D [01/Feb/2005:19:38:03 +0100] ReadClient: 5 POST /printers/ HTTP/1.1
D [01/Feb/2005:19:38:03 +0100] ProcessIPPRequest: 5 status_code=1
D [01/Feb/2005:19:38:03 +0100] AcceptClient: 7 from localhost:631.
D [01/Feb/2005:19:38:03 +0100] CloseClient: 5

Poi continua come l'inizio...

ARG! :muro: :muro:

NA01
01-02-2005, 19:20
butta via il file fatto a mano e con un browser vai su
localhost:631 e aggiungi la tua stampante
installa anche gimp-print. se ha voglia di compilarti la beta2 secondo me ne vale la pena, ci sono un sacco di cose in più (almeno per la mia stampante)

ciao

josephdrivein
01-02-2005, 20:19
Originariamente inviato da NA01
butta via il file fatto a mano e con un browser vai su
localhost:631 e aggiungi la tua stampante
Purtroppo ci ho già provato (e ho letto anche pagine e pagine di pallosissimi manuali) ma niente... se ti sono familiari i log di cups non è che riusciresti a capire a cosa è dovuto l'errore? :muro:

Per quanto riguarda gimp-print, appena riesco a stampare la compilo volentieri la beta2 :)

Al Azif
02-02-2005, 12:17
Se usi Gnome prova gnome-cups-manager, è più intuitivo dell'interfaccia web.

josephdrivein
02-02-2005, 18:18
Tengo cups ancora per un paio di giorni, poi lo elimino.

Sigh