SOLVED! Printing from XP Machine to Linux Machine Via IP:631

Post Reply
tomstrong
Posts: 3
Joined: Mon Dec 17, 2007 5:32 pm

SOLVED! Printing from XP Machine to Linux Machine Via IP:631

Post by tomstrong »

After spending hours looking at CUPS error logs, I finally found a line that held the solution!

The line said "cannot read 'Weeks' ". The account username on the XP machine is my wife's name "Alisa Weeks" - with a space between the names. The Gutenprint driver apparently had no problem handling the space in the username. The turboprint driver obviously did, because when I changed the username to AlisaWeeks (no space), printing from the remote XP box proceeded without a hitch. The answer was obscure, but it was in the log nonetheless.

Tom Weeks





Hello.

I have a home network consisting of 1 Windows XP machine and 1 Kubuntu 7.10 machine connected through a wireless router. I have an Epson Stylus C64 connected to the Kubuntu machine. Although I am using Samba to share files on the Linux box, I want to print using IP (HTTP), forgoing the use of Samba for printer sharing.

Using the CUPS Gutenprint driver I am able to do this easily, using a generic PS driver on the XP box. However, one maddening shortcoming of the Gutenprint driver is that the last page of a print job is not ejected. This is intolerable to the XP machine user at the other end of the house, since she must walk through the house and turn the printer off and back on to be able to print another job properly. Using the TurboPrint driver, the last page IS ejected, but I can't seem to get the TurboPrint driver to work using:

http://[ip address]:631/printers/tp0. (tp0 is the printer's name in the printer list)

The CUPS job admin and error log show the print job as having been successfully completed, but nothing is actually printed. When printing from the Kubuntu machine to which the printer is connected, TurboPrint works fine.

Can someone help me?

Tom Weeks
Last edited by tomstrong on Wed Dec 19, 2007 4:34 am, edited 1 time in total.
zedonet
Site Admin
Posts: 2159
Joined: Fri Oct 06, 2006 8:02 am

Post by zedonet »

Hello,

printing from the XP machine shouldn't be a problem.

Please provide the following information:

- which driver are you using on your XP machine
- can you post or email the following log files after trying to print from your XP computer (section for the last print is sufficient):

/var/log/turboprint_cups.log
/var/log/cups/error_log
tomstrong
Posts: 3
Joined: Mon Dec 17, 2007 5:32 pm

Post by tomstrong »

Hello,

printing from the XP machine shouldn't be a problem.

Please provide the following information:

- which driver are you using on your XP machine

Manufacturer: Generic --------- Driver: MS Publisher Imagesetter

- can you post or email the following log files after trying to print from your XP computer (section for the last print is sufficient):

/var/log/turboprint_cups.log ----
NEW PRINT JOB Tue Dec 18 23:06:57 UTC 2007 (pstoturboprint 1.96-3)
job-id 184
user Alisa Weeks
title Mozilla Firefox Start Page
copies 1
options job-uuid=urn:uuid:0b16c159-b568-3d5a-7910-7d3eff372908
file
test directory access:
drwxr-xr-x 2 tom tom 20480 Nov 27 05:24 /usr/share/turboprint/printers
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7fa4000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e5a000)
/lib/ld-linux.so.2 (0xb7fdb000)
/usr/bin/tpprint -v2 -l/var/log/turboprint_cups.log --ppdfile=/etc/cups/ppd/tp0.ppd --psfeatures /tmp/pstoturboprint5607.chunk /tmp/pstoturboprint5607.var
Searching PPD file and postscript header for options...
check_flag_file: opening /var/log/turboprint/prv/tp0
check_flag_file: opening /var/log/turboprint/sml/tp0
----------- Start of var file -----------
ZEDOPARM="$ZEDOPARM zedoPageRegion=Letter"
ZEDOPARM="$ZEDOPARM zedoMediaType=Plainpaper_4"
ZEDOPARM="$ZEDOPARM zedoInputSlot=AutomaticFeed"
ZEDOPARM="$ZEDOPARM zedoColorModel=RGB"
ZEDOPARM="$ZEDOPARM zedoDithering=ErrorDiffusion"
ZEDOPARM="$ZEDOPARM zedoMirror=0"
ZEDOPARM="$ZEDOPARM zedoDuplexAdjust=1"
ZEDOPARM="$ZEDOPARM zedoIntensity=0"
ZEDOPARM="$ZEDOPARM zedoBrightness=0"
ZEDOPARM="$ZEDOPARM zedoContrast=0"
ZEDOPARM="$ZEDOPARM zedoColorCorrection=1"
ZEDOPARM="$ZEDOPARM zedoUserColor=0"
ZEDOPARM="$ZEDOPARM zedoGamma=180"
ZEDOPARM="$ZEDOPARM zedoColorY=0"
ZEDOPARM="$ZEDOPARM zedoColorM=0"
ZEDOPARM="$ZEDOPARM zedoColorC=0"
ZEDOPARM="$ZEDOPARM zedoColorK=0"
ZEDOPARM="$ZEDOPARM zedoGamut=0"
ZEDOPARM="$ZEDOPARM zedoSettingA=0"
ZEDOPARM="$ZEDOPARM zedoResolution=360x360dpi"
ZEDOPARM="$ZEDOPARM zedoPrinterDriver=Epson_StylusC64"
GSPPDFOUND=1
GSCOLORMODE=2
GSXDPI=360
GSYDPI=360
GSWIDTH=3060
GSHEIGHT=3960
TPWIDTH=8500
TPHEIGHT=11000
TPXOFFSET=0
TPYOFFSET=0
DUPLEX=0
PREVIEW=0
NOPRINT=0
PVXDPI=11
PVYDPI=11
PVWIDTH=96
PVHEIGHT=125
----------- End of var file -----------
GSCOMMANDLINE=gs -sDEVICE=pcx24b -r360x360 -g3060x3960 -dSAFER -dNOPAUSE -dBATCH
TPCOMMANDLINE=/usr/bin/tpprint -a0 -e1 -s8500x11000 -p0x0 -v2 -l/var/log/turboprint_cups.log --ppdfile=/etc/cups/ppd/tp0.ppd --psheader=/tmp/pstoturboprint5607.chunk --jobid=184 --username=Alisa Weeks
COMPLETEPIPE=/usr/share/turboprint/lib/tpstdin --paste /tmp/pstoturboprint5607.chunk | gs -sDEVICE=pcx24b -r360x360 -g3060x3960 -dSAFER -dNOPAUSE -dBATCH -sOutputFile=/tmp/pstoturboprint5607.fifo - >> /var/log/turboprint_cups.log
----------- Start of print job -----------
------------ End of print job - result = 1 ------------
job cancelling procedure - TPPID=5623 GSPID=5625
------------ END of tpprint filter ------------


/var/log/cups/error_log ------------------------------
D [18/Dec/2007:23:06:44 +0000] cupsdAcceptClient: 9 from 192.168.1.3:631 (IPv4)
D [18/Dec/2007:23:06:44 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:44 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:44 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:44 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:48 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:48 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:48 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:48 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:48 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:48 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:48 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:48 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:48 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:48 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:48 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:48 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:49 +0000] cupsdReadClient: 9 POST /printers/epson64 HTTP/1.1
D [18/Dec/2007:23:06:49 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:49 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/epson64
D [18/Dec/2007:23:06:49 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:49 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:49 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:57 +0000] Print-Job http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:57 +0000] print_job: auto-typing file...
D [18/Dec/2007:23:06:57 +0000] add_job: requesting-user-name="Alisa Weeks"
D [18/Dec/2007:23:06:57 +0000] Adding default job-sheets values "none,none"...
I [18/Dec/2007:23:06:57 +0000] [Job 184] Adding start banner page "none".
D [18/Dec/2007:23:06:57 +0000] Discarding unused job-created event...
I [18/Dec/2007:23:06:57 +0000] [Job 184] Adding job file of type application/postscript.
I [18/Dec/2007:23:06:57 +0000] [Job 184] Adding end banner page "none".
I [18/Dec/2007:23:06:57 +0000] [Job 184] Queued on "tp0" by "Alisa Weeks".
D [18/Dec/2007:23:06:57 +0000] [Job 184] hold_until = 0
D [18/Dec/2007:23:06:57 +0000] Discarding unused printer-state-changed event...
D [18/Dec/2007:23:06:57 +0000] [Job 184] job-sheets=none,none
D [18/Dec/2007:23:06:57 +0000] [Job 184] banner_page = 0
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[0]="tp0"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[1]="184"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[2]="Alisa Weeks"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[3]="Mozilla Firefox Start Page"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[4]="1"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[5]="job-uuid=urn:uuid:0b16c159-b568-3d5a-7910-7d3eff372908"
D [18/Dec/2007:23:06:57 +0000] [Job 184] argv[6]="/var/spool/cups/d00184-001"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[8]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[9]="SERVER_ADMIN=root@Homemadelt"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[10]="SOFTWARE=CUPS/1.3.2"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[11]="TMPDIR=/var/spool/cups/tmp"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[12]="TZ=User defined"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[13]="USER=root"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[16]="IPP_PORT=631"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[17]="CHARSET=utf-8"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[18]="LANG=en_US"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[19]="PPD=/etc/cups/ppd/tp0.ppd"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[20]="RIP_MAX_CACHE=8m"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[21]="CONTENT_TYPE=application/postscript"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[22]="DEVICE_URI=usb://EPSON/Stylus%20C64"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[23]="PRINTER=tp0"
D [18/Dec/2007:23:06:57 +0000] [Job 184] envp[24]="FINAL_CONTENT_TYPE=printer/tp0"
I [18/Dec/2007:23:06:57 +0000] [Job 184] Started filter /usr/lib/cups/filter/pstops (PID 5606)
I [18/Dec/2007:23:06:57 +0000] [Job 184] Started filter /usr/lib/cups/filter/pstoturboprint (PID 5607)
I [18/Dec/2007:23:06:57 +0000] [Job 184] Started backend /usr/lib/cups/backend/usb (PID 5610)
D [18/Dec/2007:23:06:57 +0000] Discarding unused job-state event...
D [18/Dec/2007:23:06:57 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:57 +0000] Discarding unused printer-state-changed event...
D [18/Dec/2007:23:06:57 +0000] [Job 184] Page = 612x792; 9,9 to 603,783
D [18/Dec/2007:23:06:57 +0000] [Job 184] slow_collate=0, slow_duplex=0, slow_order=0
D [18/Dec/2007:23:06:57 +0000] [Job 184] Before copy_comments - %!PS-Adobe-3.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] %!PS-Adobe-3.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%Title: Mozilla Firefox Start Page
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%Creator: PScript5.dll Version 5.2.2
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%CreationDate: 12/18/2007 18:6:59
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%For: Alisa Weeks
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%BoundingBox: (atend)
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%Pages: (atend)
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%Orientation: Portrait
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%PageOrder: Special
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%DocumentNeededResources: (atend)
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%DocumentSuppliedResources: (atend)
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%DocumentData: Clean7Bit
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%TargetDevice: () (52.3) 320
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%LanguageLevel: 1
D [18/Dec/2007:23:06:57 +0000] [Job 184] %%EndComments
D [18/Dec/2007:23:06:57 +0000] [Job 184] Before copy_prolog -
D [18/Dec/2007:23:06:57 +0000] [Job 184] Before copy_setup -
D [18/Dec/2007:23:06:57 +0000] [Job 184] Before page loop - %%Page: 1 1
D [18/Dec/2007:23:06:57 +0000] [Job 184] Copying page 1...
D [18/Dec/2007:23:06:57 +0000] [Job 184] pagew = 594.0, pagel = 774.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] bboxw = 612, bboxl = 792
D [18/Dec/2007:23:06:57 +0000] [Job 184] PageLeft = 9.0, PageRight = 603.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] PageTop = 783.0, PageBottom = 9.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] PageWidth = 612.0, PageLength = 792.0
D [18/Dec/2007:23:06:57 +0000] [Job 184] Printer using device file "/dev/usblp0"...
D [18/Dec/2007:23:06:57 +0000] Discarding unused printer-state-changed event...
D [18/Dec/2007:23:06:57 +0000] [Job 184] backendRunLoop(print_fd=0, device_fd=5, use_bc=1, side_cb=0x80498c0)
D [18/Dec/2007:23:06:57 +0000] cupsdReadClient: 9 POST /printers/tp0 HTTP/1.1
D [18/Dec/2007:23:06:57 +0000] cupsdAuthorize: No authentication data provided.
D [18/Dec/2007:23:06:57 +0000] Get-Printer-Attributes http://192.168.1.2:631/printers/tp0
D [18/Dec/2007:23:06:57 +0000] cupsdProcessIPPRequest: 9 status_code=0 (successful-ok)
D [18/Dec/2007:23:06:57 +0000] [Job 184] tpprint: cannot read Weeks
D [18/Dec/2007:23:06:57 +0000] [Job 184] /usr/lib/cups/filter/pstoturboprint: line 42: kill: (5623) - No such process
D [18/Dec/2007:23:06:57 +0000] [Job 184] Wrote 1 pages...
D [18/Dec/2007:23:06:57 +0000] PID 5606 (/usr/lib/cups/filter/pstops) exited with no errors.
D [18/Dec/2007:23:06:58 +0000] [Job 184] /usr/lib/cups/filter/pstoturboprint: line 58: kill: (5623) - No such process
D [18/Dec/2007:23:06:58 +0000] PID 5607 (/usr/lib/cups/filter/pstoturboprint) exited with no errors.
D [18/Dec/2007:23:06:58 +0000] PID 5610 (/usr/lib/cups/backend/usb) exited with no errors.
D [18/Dec/2007:23:06:58 +0000] [Job 184] File 0 is complete.
I [18/Dec/2007:23:06:58 +0000] [Job 184] Completed successfully.
D [18/Dec/2007:23:06:58 +0000] Discarding unused printer-state-changed event...
D [18/Dec/2007:23:06:58 +0000] Discarding unused job-completed event...
D [18/Dec/2007:23:06:59 +0000] [Job 184] Unloading...
D [18/Dec/2007:23:07:28 +0000] cupsdAcceptClient: 11 from localhost:631 (IPv4)
D [18/Dec/2007:23:07:28 +0000] cupsdReadClient: 11 GET /admin/log/error_log HTTP/1.1
D [18/Dec/2007:23:07:28 +0000] cupsdAuthorize: No authentication data provided.



Tom Weeks
zedonet
Site Admin
Posts: 2159
Joined: Fri Oct 06, 2006 8:02 am

Post by zedonet »

The user name transmitted by XP seems to cause the problem. You could edit the file

/usr/lib/cups/filter/pstoturboprint

and change the line

TPCOMMANDLINE="$TPPRINT -a0 -e1 -s${TPWIDTH}x$TPHEIGHT -p${TPXOFFSET}x$TPYOFFSET -v2 -l$LOGFILE $TPOPTION --ppdfile=$PPD --psheader=$CHUNKFILE --jobid=$JOBID --username=$2"

to

TPCOMMANDLINE="$TPPRINT -a0 -e1 -s${TPWIDTH}x$TPHEIGHT -p${TPXOFFSET}x$TPYOFFSET -v2 -l$LOGFILE $TPOPTION --ppdfile=$PPD --psheader=$CHUNKFILE --jobid=$JOBID --username='$2'"

(add apostrophes ' ' around $2 at line and). If this is to complicated I can also email the file and instructions.
tomstrong
Posts: 3
Joined: Mon Dec 17, 2007 5:32 pm

Post by tomstrong »

zedonet wrote:The user name transmitted by XP seems to cause the problem. You could edit the file

/usr/lib/cups/filter/pstoturboprint

and change the line

TPCOMMANDLINE="$TPPRINT -a0 -e1 -s${TPWIDTH}x$TPHEIGHT -p${TPXOFFSET}x$TPYOFFSET -v2 -l$LOGFILE $TPOPTION --ppdfile=$PPD --psheader=$CHUNKFILE --jobid=$JOBID --username=$2"

to

TPCOMMANDLINE="$TPPRINT -a0 -e1 -s${TPWIDTH}x$TPHEIGHT -p${TPXOFFSET}x$TPYOFFSET -v2 -l$LOGFILE $TPOPTION --ppdfile=$PPD --psheader=$CHUNKFILE --jobid=$JOBID --username='$2'"

(add apostrophes ' ' around $2 at line and). If this is to complicated I can also email the file and instructions.
Thank you for your suggestions, but since I've already fixed the problem by changing the account username on the XP machine, I probably won't be changing the pstoturboprint file. I will, however, save your post in case this comes up again in a situation where a user refuses (or is unable) to remove the spaces from his/her username. I guess the change you are suggesting makes the username variable a "literal" string, making the space a valid character. I would have thought that Windows would have encoded the space as "%20" since the print job is basically sent via HTTP ( Just a FWIW -- I realize Microsoft's problems are not TurboPrint's :-) ). Perhaps this change in pstoturboprint can be incorporated in a future version.

Thaks again for your help. TurboPrint is a great product that makes Linux printing a much more user-friendly process!

Tom Weeks
Post Reply