Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Printing from Gentoo to W2k
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kalvin
n00b
n00b


Joined: 03 Feb 2004
Posts: 17
Location: Prague

PostPosted: Sat Feb 07, 2004 9:33 pm    Post subject: Printing from Gentoo to W2k Reply with quote

Hi!

I searched whole forum, web but i can't solve my problem. :evil:

My situation:

I have two computers:
1) W2k with Canon BJC 2000 printer, hostname pracovna, ip 192.168.0.1
2) Gentoo, hostname betelgueze, ip 192.168.0.2
The printer is named CanonBJC and working group is KALVODI.

I want to print from Gentoo to my Canon...

I followed instructions in some faq ( emerged cups, samba, foomatic), normal file sharing works fine.
On the linuxprinting.org i found that my printer needs gimp-print driver, so i emerged it also.

Then i tried to set up the rpinter with command:
Code:
 
foomatic-configure -s cups -p Canon-BJC-2000 -c smb://tk:password@KALVODI/pracovna/CanonBJC -n CanonBJC -d gimp-print

i got no error. When i look at localhost:631 everything looks fine:

Code:

Canon BJC-2000 Foomatic/gimp-print     
Description: Canon BJC-2000
Location:
Printer State: idle, accepting jobs.
Device URI: smb://KALVODI/pracovna/CanonBJC


When i try to print test page, nothing happend. In the jobs there is written ,,aborted''. When i try to restart job (clicking on this nice button) i get error:
Code:

client-error-not-possible


I'm really... uf.

My configuration:
SAMBA: (smb.conf)

Code:

[global]
   workgroup = KALVODI
   netbios name = betelgueze
   server string = Samba Server %v
   printcap name = cups
   load printers = yes
   printing = cups
   log file = /var/log/samba/log.%m
   max log size = 50
   encrypt passwords = yes
   smb passwd file = /etc/samba/private/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700
   print command = lpr -P %p -o raw %s -r   # using client side printer drivers.
[print$]
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   write list = @adm root


CUPS: (printers.conf)

Code:

<DefaultPrinter CanonBJC>
Info Canon BJC-2000
DeviceURI smb://tk:password@KALVODI/pracovna/CanonBJC
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>


In /etc/cups/ppd there is a file CanonBJC.ppd[/code]
One thing i don't know, what is this smb passwd file.., i have nothing in /etc/samba/private,
how can i create this file???

thanks
kalvin
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Sat Feb 07, 2004 11:16 pm    Post subject: Reply with quote

I just spent some time in the last day getting printing working from Gentoo to a Canon BJC 2110 connected to a computer running WinXp.

I found that I got the same error as you did using the foomatic print driver if it was incorrectly configured. I eventually settled on the gimp-print driver because it had better quality printing, though the foomatic looked like it had better options for my printer. I gave up trying to set the correct foomatic options due to getting that error a large part of the time.

Try changing print drivers. I am more familiar with CUPS web interface to do that.

Code:

lynx http://localhost:631

Select "Manage Printers"
Find your Canon. Select "Modify Printer" from the links under it.
At this point you will be prompted for your username and password (after maybe seeing an error message from lynx).
Fill out any info you want in this first screen (reponses not important to the functionality) and select "Continue"
Select Windows Printer via SAMBA from the drop-box
Select Continue
Enter your smb line (windows machine). Don't forget to include username and password.

smb://username:password@servername/printer

Select Continue
Select "Canon" from the drop-box. There are two "Canons"; select the first one (the one without the parenthesis after it).
Select Continue
Select "Canon BJC 2000, CUPS+Gimp-Print v4.25 (en)" NOT "Canon BJC-2000 Foomatic/bjc600 (en)"
Select Continue

Return to the Printer Screen and select "Configure Printer"
Configure it as you wish... I had no troubles with the different options.

If it works, then you know your problem was the driver configuration and you can try the foomatic driver with different configurations ("Configure Printer") or continue to use the gimp-print driver.

Samba config is not important unless you are printing to your Gentoo box from your windows box. It is important to have Samba installed because CUPS uses the "smbspool" command to do its thing. I don't even have Samba running at the moment.

good luck
Back to top
View user's profile Send private message
Furtim
n00b
n00b


Joined: 01 Dec 2002
Posts: 65

PostPosted: Sat Feb 07, 2004 11:22 pm    Post subject: Reply with quote

To add a user and password for samba > smbpasswd users_name
That is so people can log in to your samba shares.
As for printing to a Win2k box ?
Only suggestion I have is the name of the printer has to match the name
on the Win2k box exactly.
Back to top
View user's profile Send private message
kalvin
n00b
n00b


Joined: 03 Feb 2004
Posts: 17
Location: Prague

PostPosted: Sun Feb 08, 2004 7:21 am    Post subject: Reply with quote

Oh, it works! Thank You very much!!
And thanks for info about that smbpasswd file...

bye
kalvin
Back to top
View user's profile Send private message
opello
n00b
n00b


Joined: 01 Jul 2002
Posts: 35
Location: USA

PostPosted: Thu Feb 12, 2004 10:42 pm    Post subject: Reply with quote

I'm trying to print to a Windows domain, and the jobs never make it to the printer. I get various errors on the localhost:631 page (the main 2):
Quote:
"Unable to connect to SAMBA host, will retry in 60 seconds...foomatic-rip version $Revision: 3.39 $ running..."
"Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: cli_session_request() failed..."

anyway, I'm trying to add the printer with:
Code:
foomatic-configure -s cups -p HP-LaserJet_4100 -c smb://DOMAIN\username:password@se.rv.er.ip/printer -n lp1 -d hpijs
where DOMAIN is my domain, username is my username on the domain, password is password, etc... and I've tried it with DOMAIN\username and DOMAIN\\username thinking the backslash needed escaping ... all to no avail.

smbclient -L se.rv.er.ip -o username="DOMAIN\username" (then type my password) shows me the name I'm typing for 'printer'

any thoughts?
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Fri Feb 13, 2004 1:30 am    Post subject: Reply with quote

snakü wrote:

Select Windows Printer via SAMBA from the drop-box


i wanted to print to a windows ME machine (yeah. i know. it's my parents' and they have the only printer). the only problem. so far, is that there is no "windows printer via samba" option in that drop box. what might cause that?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Fri Feb 13, 2004 2:37 am    Post subject: Reply with quote

Check for /usr/lib/cups/backend/smb
If it isn't there (or is broken; it's a symlink) then remerge net-fs/samba, with cups in your USE flags.
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Sat Feb 14, 2004 7:32 pm    Post subject: Reply with quote

awesome, that was the problem - i didn't have CUPS in my use flags.
so now that option is available, but printing a test page doesn;'t work - it says printing test page, but it never shows up under active jobs - it goes straight to cancled. and there's never any activity on the printer...

here's some info:
printer shared as: printer
computer netbios name: pulsar
ip address of computer: 192.168.2.58
no password, no user
i've tried it like this:
smb://Pulsar/PRINTER
and
smb://192.168.2.58/PRINTER
didn't work though
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Sun Feb 15, 2004 9:41 pm    Post subject: Reply with quote

opello,

i would guess that it is indeed an authentication problem.
i notice that you posted the command as

"smb://DOMAIN\username:password@se.rv.er.ip/printer"

it should be

"smb://username:password@DOMAIN/server/printer"

also, see the CUPS Software ADMINISTRATORS Manual, available under "Online Help" on the first http://localhost:631 page for all sorts of other useful information. See section 7.
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Sun Feb 15, 2004 9:57 pm    Post subject: Reply with quote

MADcow,

i remember that same situation, but don't remember specifically what the problem was.

one thought: i did have to include a username before WinXP would let me print... worth a try at least. There is no password for that user, btw. Maybe try "guest" if you don't want to use a specific name (which is not something that I tried).

so, "smb://guest:@server/printer" might work since "smb://username:@server/printer" works for my user without a password.

server name works for me... i *think* that cups uses /etc/hosts for name/ip resolution.
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Feb 16, 2004 2:06 am    Post subject: Reply with quote

hmm. i tired "smb://guest:@192.168.2.58/PRINTER". no luck. maybe i need a username and password that works then.
can someone run me through setting up a username and password to access the printer then? i'm not very good with windows networking. it makes no sense... it's a windows ME machine.
thanks!
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Mon Feb 16, 2004 4:26 am    Post subject: Reply with quote

sorry, can't help you much there because I've never used ME.
If it is like 9x, then you can create a user under the Control Panel... not that I remember much involved with that.

BTW, the guest account may not have the proper permissions to print. (Should have thought of that earlier, before suggesting it.) Not sure how you would change that.
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Feb 16, 2004 4:45 am    Post subject: Reply with quote

i went to control panel->users and added a user, but it refuses to allow me to use that user for netbios access without a server for a username list or something.
so... meh
Back to top
View user's profile Send private message
opello
n00b
n00b


Joined: 01 Jul 2002
Posts: 35
Location: USA

PostPosted: Mon Mar 01, 2004 8:52 am    Post subject: Reply with quote

snakü wrote:
opello,
"smb://username:password@DOMAIN/server/printer"


I checked out the manual, and if I'm quick about refreshing the printers page, the printer shows me:
Code:
 Printer State: processing, accepting jobs.
"Unable to connect to SAMBA host, will retry in 60 seconds...foomatic-gswrapper: gs '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=HP LaserJet' '-dDEVICEWIDTHPOINTS=612' '-dDEVICEHEIGHTPOINTS=792' '-dDuplex=false' '-r300' '-sIjsParams=Quality:Quality=0,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=0,PS:MediaPosition=7' '-dIjsUseOutputFD' '-sOutputFile=| cat >&3' '/dev/fd/0' 3>&1 1>&2"
Device URI: smb://DOMAIN/server/printer-share-name


which i mapped with:
Code:
foomatic-configure -s cups -p HP-LaserJet_4100 -c smb://userid:password@DOMAIN/server/printer-share-name -n lp1 -d hpijs

note that i filled in the appropriate values when I ran the command

the next noteworthy error i get is:
Code:
 Printer State: processing, accepting jobs.
"Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: cli_connect() failed..."
(which is the same as I was getting before) and somtimes it's just the "ERROR: cli_connect() failed..." bit
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Mon Mar 08, 2004 5:41 am    Post subject: Reply with quote

Still seems like a permissions problem of some sort. (Not that I'm an expert at this.) Can you see the printer as a share when you run

Code:
smbclient -L printer_servername


This should get you a list of Samba shares on the windows machine.

If you do not see the printer, (but do see other shares) then you know that it is a problem with the windows machine's configuration.

If you do see the printer, either machine could have the problem. Either [1] you can see, but do not have permission to print to the windows printer or [2] there's some snafu with the gentoo end.

When I was using the web interface to set up CUPS, I remember that setting the password/share information could be flaky (sometimes it would not set properly). However, you do not seem to be using that interface. Even so, it would not hurt to check and be sure that a a config file somewhere is not borked. I am specifically thinking about the "/etc/cups/printers.conf" file and the line that reads:

DeviceURI smb://username:password@DOMAIN/server/printer

If this is not right, be sure to change it to the correct value.
Otherwise, I am out of suggestions.
Back to top
View user's profile Send private message
opello
n00b
n00b


Joined: 01 Jul 2002
Posts: 35
Location: USA

PostPosted: Mon Mar 15, 2004 4:52 am    Post subject: Reply with quote

I will check that conf and post back, but I was using the foomatic-configure program...

and at last try the smb://user:pass@domain/host/share didn't work, but it does show up with smbclient -L host, so I was at a loss
Back to top
View user's profile Send private message
opello
n00b
n00b


Joined: 01 Jul 2002
Posts: 35
Location: USA

PostPosted: Sat Mar 20, 2004 6:25 pm    Post subject: Reply with quote

just had time to check the conf, and it's got the right info

any other ideas?
Back to top
View user's profile Send private message
snakü
n00b
n00b


Joined: 28 Jun 2003
Posts: 23

PostPosted: Mon Mar 22, 2004 3:11 am    Post subject: Reply with quote

Quote:
any other ideas?


Not really.
Try a different driver?

http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4100

Ask here:

http://www.linuxprinting.org/forums.cgi?group=linuxprinting.hp.general

Oh, earlier I missed the fact that you have some info from the printer.

Quote:
Printer State: processing, accepting jobs.


So a connection of some kind is being made (you're using the right smb://). But we still do not know if it is a permissions problem or a config problem (including options that the driver may be passing to the printer).

--As you can read above, I'm useless for helping with a foomatic configuration problem (gave up on that and used CUPS for my Canon).

Anyone else have ideas?
Back to top
View user's profile Send private message
opello
n00b
n00b


Joined: 01 Jul 2002
Posts: 35
Location: USA

PostPosted: Fri Apr 16, 2004 6:06 pm    Post subject: Reply with quote

someone that got it to work from the campus with linux said he used the printer's ip instead of trying to go through the shared resource identifier ... I'll give that a whirl when i get back to school, but I think that'll work

but I don't believe that I should have to do it that way :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum