Gentoo Archives: gentoo-user

From: "Michael [Plouj] Ploujnikov" <ploujj@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cannot print after changing CUPS printer
Date: Sat, 01 Jul 2006 13:57:16
Message-Id: 18e575130607010647y58bc7826p32a79c7c06e66aba@mail.gmail.com
In Reply to: Re: [gentoo-user] cannot print after changing CUPS printer by Mick
1 > OK lets think through this once more. Your original $ lpstat -h
2 > localhost -t output although it shows your gray-deskjet as the
3 > default destination, it does not show that the other printer is
4 > paused.
5 >
6 > Try again to manually set the default printer (for all users) and see
7 > if it picks it up:
8 >
9 > # lpoptions -d gray-deskjet
10 >
11 > May be worth re-naming ~/.lpoptions file if it exists to make sure
12 > that only the /etc/cups/lpoptions are read by lp on each occasion.
13 >
14 > Then stop the pdfprt (not sure how you do this from the command line,
15 > I use the GUI). Check that pdfprt is stopped, gray-deskjet is idle
16 > accepting jobs and is the default printer using $ lpststat -h
17 > localhost -t. Then try to send something to the printer using lp,
18 > e.g. lp foo.txt.
19 >
20 > My guess is that for some reason your pdfprt is being picked up and
21 > its address cups-pdf:/ is not correct?
22 >
23 > HTH
24 > --
25 > Regards,
26 > Mick
27 > --
28 > gentoo-user@g.o mailing list
29 >
30 >
31 I already setup pdfprt to be paused.
32 Then I checked for ~/.lpoptions as a normal user, and didn't find it.
33 It appeared that /etc/cups/lpoptions still pointed to the old printer
34 (neither pdfprt, nor gray-deskjet).
35 So I tried to do:
36 # lpoptions -d gray-deskjet
37 lpoptions: Unknown printer or class!
38
39 Then I tried 'lpoptions -h localhost -d gray-deskjet' and it worked.
40 This changed the default printer in /etc/cups/lpoptions.
41
42 However, lpstat still says it cannot connect to server, and for
43 example enscripting a text file fails as well:
44 $ enscript todo
45 lpr: error - scheduler not responding!
46 [ 1 pages * 1 copy ] sent to printer
47
48 $ enscript -P gray-deskjet todo
49 lpr: error - unable to print file: server-error-service-unavailable
50 [ 1 pages * 1 copy ] sent to gray-deskjet
51
52 $ enscript -d gray-deskjet todo
53 lpr: error - unable to print file: server-error-service-unavailable
54 [ 1 pages * 1 copy ] sent to gray-deskjet
55
56 In fact, I just deleted pdfprt, and the situation still has not
57 changed (ever after restarting cupsd).
58
59
60 I just ran lpstat with strace, and I notices something that I
61 suspected all along, it tries to connect to my old print server:
62
63 connect(4, {sa_family=AF_INET, sin_port=htons(631),
64 sin_addr=inet_addr("10.1.1.4")}, 16) = -1 EHOSTUNREACH (No route to
65 host)
66
67 I hope no-one minds if attach the whole output from strace here.

Attachments

File name MIME type
lpstat.out application/octet-stream

Replies

Subject Author
Re: [gentoo-user] cannot print after changing CUPS printer "Michael [Plouj] Ploujnikov" <ploujj@×××××.com>