Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
Date: Thu, 14 Sep 2006 04:32:20
Message-Id: 7573e9640609132127w4f9d254fq9bbc3a763ddfadf7@mail.gmail.com
1 On 9/13/06, reader@×××××××.com <reader@×××××××.com> wrote:
2 > > Hmm, do you get something similar if you do:
3 > >
4 > > DEVICE_URI=smb://reader:XXXXX@chub/chub-print
5 > > export DEVICE_URI
6 > > /usr/bin/smbspool 0 reader test 1 0 /etc/fstab
7 >
8 > Well, that tried to print something at least. Somekind of stepping
9 > problem seems to have prevented a real print. I got 2 pages. one page
10 > with the first and second line of fstab. The second line was indented
11 > about half a page. Then a blank page.
12
13 Ok, that's good. The staircasing is easily explained/fixed, but not
14 really important. Mostly we are just interested in the fact that that
15 command did connect and try and print.
16
17 First, do an "ls -l /usr/libexec/cups/backend/smb" It should be a
18 symbolic link pointing to /usr/bin/smbspool.
19
20 If it is, then we need to see what the differences are between running
21 that command directly vs the way cups runs it. We can use some shell
22 script trickery to do this:
23
24 1. mv /usr/bin/smbspool /usr/bin/smbspool.bin
25 2. $EDITOR /usr/bin/smbspool
26 Make a new script that contains:
27 ------
28 #!/bin/bash
29 tmpfile=/tmp/smbspool.$$
30 echo $0:$1:$2:$3:$4:$5:$6:$7 > $tmpfile
31 env >>$tmpfile
32
33 # this part is just a guess..
34 export DEVICE_URI=$0
35 /usr/bin/smbspool $1 $2 $3 $4 $5 $6 >>$tmpfile
36 ------
37
38 3. chmod 755 /usr/bin/smbspool
39
40 Try printing again through cups. After the failure, you should have
41 one or more /tmp/smbspool.* files. Post one of those here, although
42 you may want to inspect it first and mask out anything that reveals
43 your password!
44
45 -Richard
46 --
47 gentoo-user@g.o mailing list