LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2015, 02:05 PM   #1
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 528
Posts: 33

Rep: Reputation: Disabled
libreoffice cannot find network printer, offers only (non-existent) generic printer


Arch linux, lxdm/lxde, recent installation, feeling I must be doing something stupid, would be glad to be guided!

I have a Brother HL-2030 printer connected to a Raspberry Pi as a print server, CUPS setup, with sharing turned on. Other machines in the household, and indeed other OS's on the machine I'm writing on, print trouble-free to this printer.

On *this* desktop machine, (with libcups installed,) other programs print trouble-free. Firefox, Thunderbird, geany and evince all detect the presence of the network printer, and work as expected.

It's just Libreoffice that does not. This is true both of libreoffice-fresh and libreoffice-still, and it is true for all the components (write, draw, calc etc).

Libreoffice *does* find the network printer from other OS's that I play with; I have Puppy and Mint on the same machine, but those installs of Libreoffice are obviously different/earlier versions (nor do I feel like upgrading them in the circumstances!)

In this context, though, the Libreoffice "File>Printer settings..." menu offers me only a "Generic Printer" (whose properties and options I can edit). If I ask Libreoffice to print to this generic printer, it reports no failure, but that task just seems to disappear into thin air.

On the Pi server, /var/log/cups/ offers

Code:
# extract from /var/log/cups/access_log
# [...snip]
192.168.2.2 - - [22/Jan/2015:18:21:21 +0000] "POST / HTTP/1.1" 200 566 CUPS-Get-Printers server-error-version-not-supported
192.168.2.2 - - [22/Jan/2015:18:21:21 +0000] "POST /printers/Brother_HL-2030_series HTTP/1.1" 200 15824 Print-Job successful-ok
# the above line logs a successful print from geany
192.168.2.2 - - [22/Jan/2015:18:26:40 +0000] "POST / HTTP/1.1" 200 673 CUPS-Get-Default server-error-version-not-supported


# extract of /var/log/cups/error_log
# [...snip]
E [22/Jan/2015:18:21:20 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:21:20 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:21:21 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:26:40 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Default (no URI) from 192.168.2.2
I really think I must be doing something very stupid and newbie-ish!
 
Old 01-23-2015, 03:13 PM   #2
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 823

Rep: Reputation: 237Reputation: 237Reputation: 237
Assuming you are running under X you can always access the cups interface by opening a webbrowser and going to
http://localhost:631/

There you can administrate printers etc... When it asks you for user and password it wants root / root password.
 
Old 01-23-2015, 03:18 PM   #3
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 823

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by pierssnell View Post
On *this* desktop machine, (with libcups installed,) other programs print trouble-free. Firefox, Thunderbird, geany and evince all detect the presence of the network printer, and work as expected.
Hmm, overlooked this line, so you did set it up already...
One thing you could try is launching the libreoffice application from the command line and see if it prints any errors when you open the print dialog...
 
Old 01-24-2015, 06:05 AM   #4
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 528
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks -- just tried that. Nothing!
 
Old 01-24-2015, 06:31 AM   #5
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Quote:
Originally Posted by pierssnell View Post

In this context, though, the Libreoffice "File>Printer settings..." menu offers me only a "Generic Printer" (whose properties and options I can edit). If I ask Libreoffice to print to this generic printer, it reports no failure, but that task just seems to disappear into thin air.
I think that really means 'I have found no valid printer, I'll offer the chance of sending a generic postscript file to some directory or other'. This may not be all that helpful, particularly if you don't know which directory (does the HD light blink when you do it? have you looked around the 'usual suspects' of temporary directories?).

Quote:
On the Pi server, /var/log/cups/ offers

Code:
# extract from /var/log/cups/access_log
# [...snip]
192.168.2.2 - - [22/Jan/2015:18:21:21 +0000] "POST / HTTP/1.1" 200 566 CUPS-Get-Printers server-error-version-not-supported
192.168.2.2 - - [22/Jan/2015:18:21:21 +0000] "POST /printers/Brother_HL-2030_series HTTP/1.1" 200 15824 Print-Job successful-ok
# the above line logs a successful print from geany
192.168.2.2 - - [22/Jan/2015:18:26:40 +0000] "POST / HTTP/1.1" 200 673 CUPS-Get-Default server-error-version-not-supported
Code:
That is sounding like 'I have a newer (or, potentially, older) server version than I recognise' (except for the geany bit). Or possibly, 'here is some message about a printer, but the details are all screwed up, so while there has been communication, I couldn't use it'.


# extract of /var/log/cups/error_log
# [...snip]
E [22/Jan/2015:18:21:20 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:21:20 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:21:21 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Printers (no URI) from 192.168.2.2
E [22/Jan/2015:18:26:40 +0000] Returning IPP server-error-version-not-supported for CUPS-Get-Default (no URI) from 192.168.2.2
I really think I must be doing something very stupid and newbie-ish![/QUOTE]

Presumably, the network printer device is broadcasting mDNS/DHCP stuff (eg, printer availability and maybe other stuff if other facilities are available) over the network, otherwise geany wouldn't work (or did you set that up manually?). Have you had a look at what messages are actually being sent (eg, wireshark for network packets - if you have a quiet network, these are usually easy to decode, more or less)?
 
Old 01-24-2015, 06:52 AM   #6
hamed.obaidy
LQ Newbie
 
Registered: Jan 2015
Distribution: Ubuntu
Posts: 6

Rep: Reputation: Disabled
You should first install the printer.
 
Old 01-25-2015, 07:11 AM   #7
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 528
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks for those thoughts, salasi.

>I think that really means 'I have found no valid printer, I'll offer the chance of sending a generic postscript file to some directory or other'. This may not be all that helpful

exactly! It's not helping me much, anyway! I just wouldn't know where to find the spool directory in any case (if spool is the term I'm looking for.) I do indeed get a blink for disk access.

>Presumably, the network printer device is broadcasting [snip] over the network, otherwise geany wouldn't work (or did you set that up manually?).

With you on that one too... and no, geany not set up manually. Adding the printer on the Pi server CUPS, I shared it as the server default, and as soon as I did so, the laptops in the house all found it all right, and my Mint and Puppy installations find it all right, and within Arch, geany, Firefox, Thunderbird and evince are all OK. I've never had to make any special effort, there's something different about Libreoffice!

>Have you had a look at what messages are actually being sent (eg, wireshark for network packets - if you have a quiet network, these are usually easy to decode, more or less)?

Easy for you, maybe! Seriously, though, although I found the volume of captured lines scrolling past rather past my skill level, it is clear that there *is* a two-way conversation going on between the IP addresses of the two machines. Libreoffice knows the printer is there, and talks to it -- it just doesn't know what sort of printer it is. I think this is the case, rather than that the printer knows it has a client, but doesn't know what sort of client it is?

OK, back to me being a newbie; I just had a look inside the libreoffice help menu to see if any mention was made of printer installation, and the only discussion I found talked in terms of adding a unix printer via a spadmin tool. No mention WHATSOEVER of the topic of cups, anywhere in the help, which I found slightly odd. Do I really have to "add" a printer separately for each software package? Seems an odd way to go about things, I thought the *idea* of an operating system was that you installed the printer, you installed the program, and the operating system told the program about the printer... but I suppose I'd better give it a try.

Going to go looking for spadmin, watch this space...
 
Old 01-25-2015, 07:25 AM   #8
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 528
Posts: 33

Original Poster
Rep: Reputation: Disabled
... ah, they didn't tell me that all you got with spadmin was a different interface to the LO "Printer settings" dialogue. No great help.
 
Old 01-25-2015, 01:38 PM   #9
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 93

Rep: Reputation: 8
Having read this, I see no mention of you installing the printer under Arch at all? If you haven't done so, I don't really understand how anything on that box can print.

You should use cups direct (http://localhost:631 from the browser of your choice) or system-config-printer app to configure the network printer. After that, everything on the machine should be able to use it. system-config-printer is an easier way of getting the printer configured, but you need to note that to use it, you must have the optional dependencies installed and also have a polkit authentication agent running (polkit-gnome or lxpolkit - either will work).

I would also check to make sure that both cups and the cups network browser service are running on the Arch install - something like "ps ax | grep cups" should tell you. If not, you will need to enable the systemd services for them.

Late versions of cups depend on having the avahai daemon running to detect a network printer. In the past I've hit problems because my small server (which has my Brother laser printer attached) is Slackware and the version of avahai available in Slack is older than the version running in my Arch desktop and laptop - the two versions do not seem to communicate properly.

Paul.
 
Old 01-25-2015, 03:08 PM   #10
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 528
Posts: 33

Original Poster
Rep: Reputation: Disabled
problem [SOLVED]

Thanks to all... problem now solved, and it *was* down to some newbie-ishness on my part, but also some unfortunate wording on the Arch wiki "CUPS" article.

Yes, Paul, I *HAD* installed the printer under Arch, in that I had followed, exactly followed, the instruction

"Installing the client package
The package libcups is the only required package. Install it from the official repositories.
Then add your CUPS server's IP address or hostname into /etc/cups/client.conf, after ServerName. That is all you need. Every application should quickly find the printer(s) shared by that CUPS server."

I followed that instruction to the letter! It was that single-line client.conf that caused the mischief. The line in the provided template client.conf read
Code:
ServerName /run/cups/cups.sock #  alternative: ServerName hostname-or-ip-address[:port] of a remote server
and I added the server's IP address in, after ServerName, exactly as instructed, and while I was about it, experimented briefly with changing /run/cups/cups.sock to /var/run/cups/cups.sock, because that's the path to cups.sock on the Pi. I also added in /version=1.1 after the hostname, as mentioned in the man page, though not on the wiki. (The "alternative" comment I took to be a clarification that either the hostname or ip address would work, and the port number needed in some cases.) I therefore had the following client.conf --
Code:
ServerName 192.168.2.10:631/version=1.1 var/run/cups/cups.sock
Now, if that client.conf simply hadn't worked, I might have worked out quite soon that I'd got it wrong... My problem was that it DID work, perfectly well, for four different packages in my installation, and for all the other computers and OS's, and I just wasted a ridiculous amount of effort trying to work out what it was that was different about Libreoffice. Talk about fishing for a red herring. It will remain a mystery to me why it was that the superfluous bit of the line didn't cause a problem for anything but LO, and even LO only in this particular OS. I'm sure there is a reason. Might some applications rely more on the internet printing protocol side of things, and others rely more on the cups architecture? Anyway, academic, because it now all works, as soon as the /var/run/cups/cups.sock reference is deleted. Thank you for your patience, all who have offered help.

Best,
Piers.

Last edited by pierssnell; 01-25-2015 at 03:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Libreoffice 3.4.2 can't find a standard printer ToK Linux - Software 3 10-19-2011 09:05 AM
windows cant find printer on network RuRat Linux - General 1 03-31-2009 09:19 PM
how do I find and use a network printer on xubuntu? Pinkhippochic Linux - Hardware 2 10-10-2007 12:52 AM
Why can't I find a Generic PCL printer driver on CUPS rickh Linux - Hardware 1 05-05-2006 08:20 AM
Printer problems, can't find a printer that is attached to a windows network. ahalfapint Linux - Networking 2 04-12-2006 04:29 PM


All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration