Page 1 of 1

Printing to Win2K printer

Posted: Sat Sep 27, 2008 8:13 am
by darkstar
Well I am defeated... been trying every which way I can think of to get this Turboprint to work but no joy.... I have installed TurboPrint on my SuSE11.0 system (the installation went far better that it did for me on SuSE10.3 where it utterly failed to even start. ) I have a Canon Pixma MP780 printer connected to a Win2K machine where it is shared to everyone. All my Windoz and Linux systems are on the same network/WORKGROUP. Other Windoz machines on my network have no problem printing to this printer. Now I need to get my Linux machines on my network to talk to the printer, which is where I was hoping TurboPrint would come to the rescue and make it nice an easy... No Such Luck!!!

I have tried to read the documentation till my head hurts. This is a freaking nightmare to understand - TurboPrint, CUPS, Samba, protocols, network login formats, yada yada yada. No where can I find a nice simple explanation of the underlying model of how all these layers work, what talks to what, and how the user can verify that things are working properly between all these layers, etc.. The TurboPrint console gui is just a basic data input interface and does NOT act as a guide helping me to find a solution, instead it expects me to be some kind of a guru on all this stuff I guess..

My best guess so far, when using the TurboPrint Control to add a new printer is to select "Windows network printer" for the Connection type. For Server I typed in both the name of my Win2K system and I also tried using its IP address.. Neither has worked so far... For Printer, I typed in the share name of the printer that I gave to it when I configured the printer to be shared and accessible to everyone. I filled in the Workgroup with the name of my Windoz workgroup... For Name and Password I have tried just about every combination of a name and password (local linux user names and passwords, Win2K user names and passwords, no user name, user names with no passwords. etc.. Nadda nothing.. I even tried to guess at and use Windoz network naming conventions like //servername/username but I really have no idea what the format should be, if this is what is required...

In all these cases I have hit the "Test Server Connection" button and it always comes back and says it succeeded! Succeeded at WHAT??? Whatever that button is testing is neither clear nor apparently a very good test because I sure don't get any printer output when I later try to print something.. All it reports is the print servers IP address and that it successfully connected to port. WHAT port? Outgoing port on my Linux system? Incoming port on the Win2K machine? What does it mean by this message? I dunno, can't find it documented anywhere.... Did it actually "log" in with my User name and password and talk to the printer server on the Win2K box? I dunno.... again no documentation...

The rest of the Add Printer setup seems to go fairly well, I can find and add the proper printer etc.. but when it asks me to print a test page nothing happens... And nothing guides me to what might have gone wrong... It doesn't even ask me if it succeeded or not in printing that test page... Ditto for the Toolbox "Print Test Page"...

Like I said, I can find no documentation describing the model behind Turboprint so I have no idea what other components of the system it is dependent on or what to look for/test. For example, does this need CUPS to accomplish what I want? If so, how do I configure CUPS to talk to the printer server on the Win2K box? To TurboPrint? How do I test that this connection between CUPS and Turboprint is working correctly? There is no documentation describing any of this, that I could find. I fooled around with CUPS some but it is a far worse nightmare to understand so I gave up... If I really do need it I will go back and play with it some more...

What is really damn confusing about the relationship between CUPS and TurboPrint, is that CUPS seems to know about the TurboPrint name - tp0 - that TurboPrint gave for this printer. When I bring up the CUPS configuration GUI, tp0 is listed as one of the possible printers to use, so that leads me to believe that CUPS is dependent on TurboPrint. But when I do something like click on the "Accept Jobs" button in the TurboPrint Printer Monitor I get asked for the CUPS password. So is TurboPrint dependent on CUPS or is CUPS dependent on TurboPrint? And why? I dunno... no documentation...

Like a lot of application GUIs today this one does a fine job (I am guessing) on gathering the data that it needs from a user. But like most application GUI's it fails miserably at teaching and guiding the user towards finding a successful solution. And worse it expects the user to have a great deal of technical knowledge about all these tools, protocols, layers etc. That is ALWAYS a sign of a poorly designed user interface and one that has not been well tested with real world users...

You may argue that you have had a lot of users successfully use this product, but I will counter that I didn't read anywhere that I needed to be a Linux internals guru to use this product! Anywise I am quite frustrated with it now so am in need of help to get this going...

I have included my latest state of turboprint.cfg file, as generated by TurboPrint Control, with sensitive info removed, if that helps.. (It has gone through a LOT of permutations! including things like hand editing it, guessing that some parts seems likely to be wrong.. Devicename for example... seems odd that it is referring to a local device and not something on the network.. or RemoteIP and RemoteURI also seems odd to be an empty string... I tried filling in with values/guesses, again no documentation... but no joy... And I have no idea how to set these via TurboPrint Control, if indeed they should be set to something...

Darkstar..


[Turboprint_Config_File]

[turbo2]
Default=0
Name="Canon_PIXMA_MP780"
Short="tp0"
Port="smb"
Devicename="/dev/lp0"
Filename="/tmp/turboprint.prn"
Remoteprinter="Canon"
Remoteserver="MyServersName"
Remoteuser="MyName"
Remotepassword="MYEncryptedPassword"
Remoteworkgroup="MyWorkGroupName"
Remoteip=""
Remotesocket=""
Remoteuri=""
Driver="Canon_PIXMA_MP780"
Colormode=2
Preview=0
Cartridge=0
Paper=0
Quality=1
Pagesize=4
Borderlessexpand=2
Customsize=5000,7000
Feed=0
Tray=0
Duplex=0,0,0
Copies=1
Dithering=0
Truematch=1
Mirror=0
Usercolor=0
Brightness=0
Contrast=0
Screengamma=180
Inkvolume=0
Colorsaturation=0
Intensity_KCMY=0,0,0,0
Limit_KCMY=0,0,0,0
Inklimit=0
Bright_KCMY=0,0,0,0
UCR=0
TAC=0
Colorspace=0
CMYKspace=0
Intent=1
Greytone_AB=0,0
RefLight=6500
GS_X_Scale=100
GS_Y_Scale=100
GS_X_Offset=0
GS_Y_Offset=0
GS_Screen_Lpi=0
GS_Buffer=0
PIC_Ignore_Margins=0
PIC_Position=0,0
PIC_Size=7000,0
PIC_Center=1,1
PIC_Aspect=1
A2PS_Defaults=0
A2PS_Landscape=0
A2PS_Borders=1
A2PS_Headers=1
A2PS_Columns=1
Landscape=0
Number_Up=1
Image_X=1
Image_Y=1
Image_Scaling=100
Use_Image_Scaling=0
Image_DPI=300
Use_Image_DPI=0
Text_CPI=10
Text_LPI=6
Pretty_Print=0
Settings=

Posted: Tue Sep 30, 2008 9:04 am
by zedonet
Hello,

generally, your setup seems correct:
... select "Windows network printer" for the Connection type.
For Server I typed in both the name of my Win2K system
and I also tried using its IP address..
For Printer, I typed in the share name of the printer that I gave to it when I configured the printer to be shared and accessible to everyone.
Additionally, you may have to enter "guest" as user name.
The parameters "Workgroup" name and "password" are not required, unless

- the workgroup name of your Linux client is different from the workgroup name of the Windows printer server
- an actual user name and password are required to access the printer

The button "Test" only checks if the network name can be resolved and the computer has Windows printer sharing enabled. It does not check if the shared printer exists and if user name / password is correct.

There is a possiblity to test / debug these things (this is a bit technical, but this is also what most Linux users like about Linux):

From a command line ("Terminal" window) enter

Code: Select all

echo "hello" | smbclient //server/printer -c "print -"
this will send the text "hello" to the printer "printer" on server "server" (change "server" and "printer" to the server name and printer share name on your network).

The printer will not print but you should see if the connection works (e.g. hold the print queue on XP and check if a print job appears.

If this works, printing should also work via Turboprint - in TurboPrint Setup, choose "Remote Windows" as connection, enter the "server" name and the "printer" name and "guest" as "user name".

Nada still no joy getting this to send print jobs

Posted: Tue Sep 30, 2008 7:26 pm
by darkstar
:( OK I have followed your suggestions, again trying different permutations as well, but I still cannot get anything to print out....
Additionally, you may have to enter "guest" as user name.
I tried using guest, no joy...
The parameters "Workgroup" name and "password" are not required, unless

- the workgroup name of your Linux client is different from the workgroup name of the Windows printer server
- an actual user name and password are required to access the printer
I have tried this with and without workgroup name and with and without password. No joy...
There is a possiblity to test / debug these things (this is a bit technical, but this is also what most Linux users like about Linux):

From a command line ("Terminal" window) enter

Code:
echo "hello" | smbclient //server/printer -c "print -"


this will send the text "hello" to the printer "printer" on server "server" (change "server" and "printer" to the server name and printer share name on your network).

The printer will not print but you should see if the connection works (e.g. hold the print queue on XP and check if a print job appears.
This asked me for my password which I entered... it actually did put a print job into the print queue of my Win2K system. So yes at this layer it seems to be trying... But when I enter the same information - server name, user name, password, into the Turboprint Control Center setup nothing happens when I try to print a test page. I do see it show up as a print job in the Turboprint Monitor, and in the KDE printer monitor, but NOT in the Win2K printer job queue.



Darkstar :(

Posted: Wed Oct 01, 2008 8:09 am
by zedonet
The next step would be to look into the log files

/var/log/turboprint/print.log

and

/var/log/cups/error_log

directly after trying to print. The files are too long to post but you can send them by email (referring to this post) to:

mail (at) zedonet (dot) de .

Posted: Wed Oct 01, 2008 5:44 pm
by darkstar
I have sent you the log files as per your request. I have a couple of observations that may be important...

1. Something seems odd about the TurboPrint Control Center configuration process. I set up the printer using the Windows network printer connection and the URI seems to be valid - Canon@darkstar2000 which is the name of the Win2K system where this printer is attached. But when I close the TurboPrint Control Center and then reopen it the connection has mysteriously changed to other (CUPS URI) and the URI becomes file:/dev/null Why is this changing It does not seem right and is quite confusing!

2. The TurboPrint print.log file does show a couple of errors apparently when trying to open some files and some sort of complaint about can't read magic header whatever the heck that means..

ERROR:
inifile::write: could not open output file
/var/turboprint/marc/tp0.ink
...
pixmap_class::open: can't read magic header
print_page: end of input file
Report at end of pdrivecontrol_class::release_printer
Total memory usage=0
child process terminated
ERROR:
inifile::write: could not open output file
/var/turboprint/marc/tp0.job

I looked at the files in question and their permissions as shown here but have no idea why this is wrong... (I also observed that CUPs daemon runs with the user id of lp if that helps...)

marc@bigbang:/var/turboprint/marc> ll
total 20
prw-rw---- 1 marc lp 0 2008-09-27 00:22 b0
prw-rw---- 1 marc lp 0 2008-09-27 15:03 b1
prw-rw---- 1 marc lp 0 2008-09-30 11:58 b2
prw-rw---- 1 marc lp 0 2008-10-01 09:45 b3
prw-rw---- 1 marc lp 0 2008-09-26 21:24 b4
prw-rw---- 1 marc lp 0 2008-09-26 22:30 b5
prw-rw---- 1 marc lp 0 2008-09-26 08:08 b6
prw-rw---- 1 marc lp 0 2008-09-26 08:08 b7
prw-rw---- 1 marc lp 0 2008-10-01 09:45 fd
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m0
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m1
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m2
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m3
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m4
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m5
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m6
prw-rw---- 1 marc lp 0 2008-09-26 08:08 m7
drwxrwx--- 2 marc lp 4096 2008-09-27 15:02 prv
drwxrwx--- 2 marc lp 4096 2008-09-26 08:08 sml
-rw-rw-rw- 1 lp lp 233 2008-09-26 21:24 tp0.ink
-rw-rw-rw- 1 lp lp 124 2008-09-26 21:24 tp0.job
drwxrwx--- 2 marc lp 4096 2008-09-26 21:24 zmf

3. The CUPs log file repeats a lot of the same messages over and over again, probably because of all my attempts to get things to work... The only line in that file that I found interesting is a message that says -

E [01/Oct/2008:09:51:36 -0700] CUPS-Add-Modify-Printer: Unauthorized

which is an error message but I have no idea what to do to fix it...


Darkstar....

waiting for a reply

Posted: Thu Oct 09, 2008 5:21 pm
by darkstar
Hmmm It has been a week since I sent you an email with the log file and my last post/inquiry. Just wondering if you got my email OK and have any further thoughts...

Darkstar...
:?

Posted: Fri Oct 10, 2008 7:10 am
by zedonet
Hello,

I sent this by email just an hour ago:

Thank you for the log files!

The problem seems to come from authorization problem within CUPS - the result is that the network address (URI) is not correctly stored and becomes file:/dev/null instead.

I have no explanation yet. However, I will try to find out more and get back to you.

Posted: Fri Oct 10, 2008 7:18 am
by zedonet
PS: You could try to set the CUPS URI from either

- the CUPS WEB frontent (http://localhost:631/printers)
- the KDE or Gnome printer setup tool.
- by editing /etc/cups/printers.conf - change the line "DeviceURI file:/dev/null" (cups must be restarted for changes to become effective, the command is "sudo /sbin/service cups restart")

For Windows/Samba network printers the URI has the form

smb://servername/printersharename

or

smb://username:password@workgroupname/servername/printersharename

setting cups url does not seem to help

Posted: Sat Oct 11, 2008 6:08 pm
by darkstar
I could not figure out how to set the CUPS URL via either the CUPS web frontend though I can bring it up, nor via the KDE printer setup tool.. Both tools are rather confusing to use IMHO... Anywise I tried a number of combinations for the device URI, in /etc/cups/printers.conf as you suggested, with and without the username:password part and still no joy. But I have gotten a new spooler error message in the TurboPrint Printer Monitor saying -

'Backend /usr/lib64/cups/backend/smb does not exist!'

I dunno if I am missing some CUPS package that supplies this, I tried to download a couple of things that seems like they might possible have something to do with CUPS backends but so far I have not found anything that will install one for smb... (again I am just guessing as to what might be the problem so probably way out in "left field" somewhere...

Darkstar... :(

Partially SOLVED!

Posted: Sat Oct 11, 2008 7:05 pm
by darkstar
OK my last posting got me to do a bit more investigating... I took a look in /usr/lib/cups/backend just to see if anything was there and sure enough there was a link for smb to /usr/bin/smbspool SO I decided to try an experiment and put this same link in /usr/lib64/cups/backend THEN printing a testpage from the TurboPrint Control Center worked! I also tried the other Toolbox items, "Show Ink Levels" fails with a report that it cannot obtain the ink levels. "Clean Print Heads" made the printer do something inside but nothing was printed out so I presume it cleaned the print heads... "Nozzel Check" printed out a test pattern that looks like the one I normally get from the Canon utilities and was OK. "Align Print Head" also printed out a page with a lot of Cyan and Grey/black boxes but no other colors. I have never seen this sort of test pattern before so cannot say it worked right or wrong...

So the only thing that would be nice, but not absolutely necessary, is for the "Show Ink Levels" to work. I will now begin testing this with other print jobs and from other Linux computers on my network and report back if anything fails...

Is this a bug I should report to SuSE/Novell?

Darkstar...

printing from another linux laptop

Posted: Sun Oct 12, 2008 3:00 am
by darkstar
This is a followup to my previous posting... I set up TurboPrint on a Linux laptop which can see my Linux gateway computer where I had set up the first instance of TurboPrint. The gateway computer sends the print jobs to a Windows2K system that it can see using the smb CUPS backend as we previously talked about. I have installed a keyfile license for both of these instances of Turboprint.

The laptop is configuring its copy of TurboPrint to send print jobs to the gateway computer via using a Windows network printer also. My understanding of this means that it is Samba running on my gateway computer that will receive the print job request, and forward it on to CUPS/Turboprint running on the gateway computer also. This in turns forwards the print job on to the Win2K system where the printer is actually connected to.

The laptop is successfully sending print jobs and the gateway successfully forwards the print job on to the Win2K system where it is printed out. The only glitch that I thought I should mention is that the laptop's version of the TurboPrint Printer Monitor thinks the printer is not connected or switched off. Somewhat confusing, and would be nice to see that fixed also...

Marc.. :?