From owner-freebsd-openoffice@FreeBSD.ORG Sun Mar 12 17:29:10 2006 Return-Path: X-Original-To: freebsd-openoffice@FreeBSD.ORG Delivered-To: freebsd-openoffice@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 769F716A400 for ; Sun, 12 Mar 2006 17:29:09 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id F270443D58 for ; Sun, 12 Mar 2006 17:29:05 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 8398A3B9C4; Sun, 12 Mar 2006 18:29:03 +0100 (CET) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) by hal9000.schweikhardt.net (8.13.4/8.13.4) with ESMTP id k2CHShUZ009753 for ; Sun, 12 Mar 2006 18:28:43 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.4/8.13.4/Submit) id k2CHShR8009752 for freebsd-openoffice@FreeBSD.ORG; Sun, 12 Mar 2006 18:28:43 +0100 (CET) (envelope-from schweikh) Date: Sun, 12 Mar 2006 18:28:43 +0100 From: Jens Schweikhardt To: freebsd-openoffice@FreeBSD.ORG Message-ID: <20060312172843.GA1838@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: Subject: ooo can't find default printer even though any other app can X-BeenThere: freebsd-openoffice@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting OpenOffice to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 17:29:10 -0000 hello, world\n I'm trying to get ooo to print to my Laserjet 2300d. The details: openoffice.org-2.0.2.rc2 on FreeBSD 7-CURRENT as of a few days ago, using CUPS (cups-1.1.23.0_1, cups-lpr-1.1.23.0_1, cups-base-1.1.23.0_8, cups-pstoraster-8.15). I compiled the system with NO_LPR=, so the system print tools are not in /usr/sbin. Printing from the command line, from other apps like acroread or ghostview works like a charm. So CUPS is unlikely to be the culprit. When I want to print a spreadsheet from within ooo with File->Print... I get a message box saying "No default printer found. Please chose a printer and try again." Then I am presented with a dialog to chose a printer, but the list of available printers is empty and there is now way I know of to enter a printer name. I've done some investigation, especially looking at the place where ooo builds the list of available printers with lpc. It looks like this is in source/printer/printerinfomanager.cxx, around these lines struct SystemCommandParameters { const char* pQueueCommand; const char* pPrintCommand; const char* pForeToken; const char* pAftToken; unsigned int nForeTokenCount; }; static const struct SystemCommandParameters aParms[] = { #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0 }, { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0 }, { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1 } ... #endif }; I made /usr/sbin/lpc a symlink to CUPS' /usr/local/sbin/lpc, just in case not all of these commands would be tested. (I assume that any parseable output of a single command would be enough). Anyway, the output of these three commands is # /usr/sbin/lpc status LaserJet_2300d: printer is on device 'parallel' speed -1 queuing is enabled printing is enabled no entries daemon present # lpc status LaserJet_2300d: printer is on device 'parallel' speed -1 queuing is enabled printing is enabled no entries daemon present # LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s system default destination: LaserJet_2300d device for LaserJet_2300d: parallel:/dev/lpt0 With the exception of the last entry, where CUPS prints "device for" instead of the expected "system for", this should tell ooo that I have a "LaserJet_2300d". But it doesn't. I'm stumped. What is the magic incantation to make ooo print when using CUPS? Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)