Date: Sun, 12 Mar 2006 18:28:43 +0100 From: Jens Schweikhardt <schweikh@schweikhardt.net> To: freebsd-openoffice@FreeBSD.ORG Subject: ooo can't find default printer even though any other app can Message-ID: <20060312172843.GA1838@schweikhardt.net>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060312172843.GA1838>