Printing from wine problem - loosing my hair

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Printing from wine problem - loosing my hair

Post by ogardarsson »

I have a Ubuntu 9.04 minimalist setup runing on a XEN vps. I only installed a few things like Wine, NX, cups (and cups-pdf), XFCE4. Works like a charm in every way except printing from Wine. I can print from native Linux apps to PDF but I get an error in Notepad and any other wine running app for that matter, StartPage failed. There are no errors in the /var/log/error_log or any mention of the incident in any logs under /var/log/cups/
I have been looking for the solution for a week. Anybody have any idea what could be the problem? I have a similar setup on a Ubuntu 8.04 although the difference there is that I installed Gnome.
James McKenzie

Printing from wine problem - loosing my hair

Post by James McKenzie »

ogardarsson wrote:
I have a Ubuntu 9.04 minimalist setup runing on a XEN vps. I only installed a few things like Wine, NX, cups (and cups-pdf), XFCE4. Works like a charm in every way except printing from Wine. I can print from native Linux apps to PDF but I get an error in Notepad and any other wine running app for that matter, StartPage failed. There are no errors in the /var/log/error_log or any mention of the incident in any logs under /var/log/cups/
I have been looking for the solution for a week. Anybody have any idea what could be the problem? I have a similar setup on a Ubuntu 8.04 although the difference there is that I installed Gnome.
Open notepad under Wine. Does the PDF printer appear?

James McKenzie
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Notepad shows PDF yes

Post by ogardarsson »

Yes Notepad shows the print dialog normally with the PDF option. I can click "Print" and then it dispays the forementioned error. Also please note that the version of Wine is 1.1.27
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Fri, 2009-08-14 at 11:11 -0500, ogardarsson wrote:
I have a Ubuntu 9.04 minimalist setup runing on a XEN vps. I only
installed a few things like Wine, NX, cups (and cups-pdf), XFCE4.
Works like a charm in every way except printing from Wine. I can print
from native Linux apps to PDF but I get an error in Notepad and any
other wine running app for that matter, StartPage failed. There are no
errors in the /var/log/error_log or any mention of the incident in any
logs under /var/log/cups/
A previous thread pointed out that WINE expects to use a socket
connection to CUPS, so have you configured CUPS to listen for attempts
to connect via a socket? Its default is not to listen.

In my Fedora 10 setup (Gnome) you select Server|Settings and then, in
the Basic Server Settings dialog checking "Publish shared printers
connected to this system" should do it.


Martin
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sat, 2009-08-15 at 11:44 +0100, Martin Gregorie wrote:
In my Fedora 10 setup (Gnome) you select Server|Settings and then, in
the Basic Server Settings dialog checking "Publish shared printers
connected to this system" should do it.
Thats within the 'Printing' system administration tool of course!

Martin
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

Martin Gregorie wrote:On Sat, 2009-08-15 at 11:44 +0100, Martin Gregorie wrote:
In my Fedora 10 setup (Gnome) you select Server|Settings and then, in
the Basic Server Settings dialog checking "Publish shared printers
connected to this system" should do it.
Thats within the 'Printing' system administration tool of course!

Martin
I'm trying to avoid installing a big GUI like Gnome because this is running in a datacenter VPS where one tries to keep all that is not strictly necessary out. I do have XCFC4 in there though because it has a slight footprint in all aspects. Do you know a way to do this in the command line?

Oli
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sat, 2009-08-15 at 09:34 -0500, ogardarsson wrote:
Martin Gregorie wrote:
On Sat, 2009-08-15 at 11:44 +0100, Martin Gregorie wrote:
In my Fedora 10 setup (Gnome) you select Server|Settings and then, in
the Basic Server Settings dialog checking "Publish shared printers
connected to this system" should do it.

Thats within the 'Printing' system administration tool of course!

Martin
I'm trying to avoid installing a big GUI like Gnome because this is
running in a datacenter VPS where one tries to keep all that is not
strictly necessary out. I do have XCFC4 in there though because it has
a slight footprint in all aspects. Do you know a way to do this in the
command line?
I appreciate that. I thought Ubuntu used Gnome rather than KFE or the
lightweights like XFCE, but in any case the Fedora CUPS defaults are
likely to be common across most distros. And distros using CUPS will
have similar tools for configuring CUPS: now you know where to start
looking.

Martin
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

[/quote]I appreciate that. I thought Ubuntu used Gnome rather than KFE or the
lightweights like XFCE, but in any case the Fedora CUPS defaults are
likely to be common across most distros. And distros using CUPS will
have similar tools for configuring CUPS: now you know where to start
looking.

Martin[/quote]

Actually I looked into the web config that comes with cups. It allows one to access these settings like "Share published printers connected to this system". It was already active.
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sat, 2009-08-15 at 10:24 -0500, ogardarsson wrote:
I appreciate that. I thought Ubuntu used Gnome rather than KFE or the
lightweights like XFCE, but in any case the Fedora CUPS defaults are
likely to be common across most distros. And distros using CUPS will
have similar tools for configuring CUPS: now you know where to start
looking.

Martin[/quote]

Actually I looked into the web config that comes with cups. It allows
one to access these settings like "Share published printers connected
to this system". It was already active.


[/quote]In that case "nmap" should show port 631 as open and

sudo lsof | grep -i 'cupsd.*TCP'

should output a line or two showing that CUPS is listening for print
requests:

$ sudo lsof | grep -i 'cupsd.*TCP'
[sudo] password for kiwi:
cupsd 2625 root 13u IPv4 13958 0t0 TCP *:ipp (LISTEN)
cupsd 2625 root 14u IPv6 13959 0t0 TCP *:ipp (LISTEN)

I trimmed a bit of space from those lines so they don't wrap. Telnet
should also connect to CUPS with the command

telnet localhost 631

Here's what I got:

$ telnet localhost 631
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
telnet>
Connection closed.

If neither of these succeed, then the web config is being economical
with the truth and your cupsd is not listening for TCP connections..


Martin
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

These are excellent troubleshooting tips Martin. Here are the results:

lsof | grep -i 'cups.*TCP'
cupsd 3146 root 0u IPv4 2367942 TCP *:ipp (LISTEN)
cupsd 3146 root 13u IPv6 2367943 TCP *:ipp (LISTEN)
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sun, 2009-08-16 at 03:49 -0500, ogardarsson wrote:
These are excellent troubleshooting tips Martin. Here are the results:

lsof | grep -i 'cups.*TCP'
cupsd 3146 root 0u IPv4 2367942 TCP *:ipp (LISTEN)
cupsd 3146 root 13u IPv6 2367943 TCP *:ipp (LISTEN)
That certainly shows CUPS is listening and, as I said, an earlier thread
reckoned that connecting through the IPP protocol was WINE's preferred
way of printing.

If the telnet trick connects to those ports and you still can't get WINE
to talk to CUPS there must be a WINE problem and that's out of my
knowledge area: so far I haven't used WINE with any programs that can
print.


Martin
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

I was also able to telnet to 631, go the same results as you
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

Martin Gregorie wrote:That certainly shows CUPS is listening and, as I said, an earlier thread reckoned that connecting through the IPP protocol was WINE's preferred
way of printing.

If the telnet trick connects to those ports and you still can't get WINE
to talk to CUPS there must be a WINE problem and that's out of my
knowledge area: so far I haven't used WINE with any programs that can
print.


Martin
Thanks for the help Martin. I'm closer now to isolating the problem. So far I have been able to make this work on all versions of Ubuntu with Gnome, but if Gnome installation is skipped, something is missing in the Wine access to the cups print engine. Tried turning off the print sharing on systems with Gnome and it did not stop Wine apps from printing. Something is blocking wine programs from printing and it does not seem to have anything to do with the general cups settings as such.
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sun, 2009-08-16 at 05:16 -0500, ogardarsson wrote:
So far I have been able to make this work on all versions of Ubuntu
with Gnome, but if Gnome installation is skipped, something is missing
in the Wine access to the cups print engine.
Does mean you are using a text-only system or that you're using a
different desktop, e.g KDE or XFCE?
Tried turning off the print sharing on systems with Gnome and it did
not stop Wine apps from printing. Something is blocking wine programs
from printing and it does not seem to have anything to do with the
general cups settings as such.
That's odd, but there is presumably some Gnome-specific printing code,
if only to put the printer notification on the menu bar when there are
documents in the queue. At least, I assume KDE has another way of doing
that and XFCE probably lacks it. Disclaimer: I don't use KDE and my only
XFCE exposure is when I'm using VNC. I realise this isn't much direct
use, but it may give you some ideas on where to look. It also sounds
like something that needs following up on Ubuntu forums.


Martin
ogardarsson
Level 1
Level 1
Posts: 8
Joined: Fri Aug 14, 2009 10:55 am

Re: Printing from wine problem - loosing my hair

Post by ogardarsson »

Martin Gregorie wrote:Does mean you are using a text-only system or that you're using a different desktop, e.g KDE or XFCE?
I have XFCE installed on this particular server but not Gnome. Basically I'm not using the XFCE desktop except for admin testing. It's general use will be GUI applications delivered using X11 to the users, including Win applications running under Wine emulation. Only problem is the printing from Wine. Printing from native Linux apps is fine.

I have a number of other Ubuntu servers in VPS and on dedicated hardware. All running Gnome and some have XCFE4 and KDE also. None of them have any problems with pringing in Wine, just this one server that I'm trying to avoid installing Gnome on. Maybe I should just install it and remove it later. I just don't know how it will go with the removal. Will I have a ton of libraries and stuff taking up space? I guess I should test removing it on a test copy of a VPS to see how goes.


Martin[/quote]
Martin Gregorie

Printing from wine problem - loosing my hair

Post by Martin Gregorie »

On Sun, 2009-08-16 at 11:21 -0500, ogardarsson wrote:
Martin Gregorie wrote:
Does mean you are using a text-only system or that you're using a different desktop, e.g KDE or XFCE?
I have XFCE installed on this particular server but not Gnome.
Understood. I frequently run apps that way, but without using VNC to get
a remote desktop. I'm not fond of XFCE but have discovered two
disadvantages of VNC configuring it to use Gnome: (1) the colour is
terrible since VNC uses no more than 256 bit colour and (2) this messes
with the local X-term settings, though this may not bother you if you
don't use local logins: I do and every time I logged I was asked whether
I wanted to use Gnome or X-term display settings. Fortunately this
stopped when I upgraded from F8 -> F10.

Instead I just configure ssh to permit X11 forwarding and use an ssh
session to start remote GUI applications.
Maybe I should just install [Gnome] and remove it later.
I suspect you'll end up doing that. I take it that you have no hosts
with KDE but no Gnome: it would be interesting to know if WINE printing
works with KDE.
I just don't know how it will go with the removal. Will I have a ton
of libraries and stuff taking up space?
It might be useful to know how much space it occupies. Can you record
disk space used with 'df' before and after installing Gnome: the
difference must be the size of Gnome. I for one would be like to know
how much space Gnome occupies.
I guess I should test removing it on a test copy of a VPS to see how
goes.
My guess is that removing Gnome again will stop printing from working.


Martin
mayak
Newbie
Newbie
Posts: 1
Joined: Tue Aug 18, 2009 3:31 pm

Post by mayak »

I found the solution! As me, the cupsys-bsd package was missing, because I installed lpd in trying to set up the HP LJ 1000 winprinter.
I just started the 'wine notepad' in the terminal and tried to print a sheet, so it said it lacks the package.
Will it work for you?
zaubertuba
Newbie
Newbie
Posts: 3
Joined: Sat Sep 12, 2009 11:46 am

Similar Problem

Post by zaubertuba »

Hello, I'm having the same problem running Mythbuntu 9.04. I tried mayak's solution and was able to get wine notepad to print with no problems. However, when I try to print from WordPerfect under Wine, I get the following pop-up window in WordPerfect:

"Warning - The printer is currently unavailable. The printer and/or server may be offline. If this is not the case, it may be necessary to reinstall the printer."

In the console (I have it showing just for this sort of debugging), wine is returning the following error"

"err:winspool:WINSPOOL_GetPrinter Can't find opened printer L"\009ccx4100" in registry"

I've installed most of the other "compatibility/placeholder" libraries I could find, and still get the same message. Any ideas?
Locked