From owner-freebsd-questions@freebsd.org Mon Jan 23 07:29:28 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79A6ECBDA92 for ; Mon, 23 Jan 2017 07:29:28 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.he.net", Issuer "GeoTrust SSL CA - G4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A78D1C27 for ; Mon, 23 Jan 2017 07:29:28 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from ::ffff:99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (AES128-SHA:SSLv3:Kx=RSA:Au=RSA:Enc=AES(128):Mac=SHA1) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Sun, 22 Jan 2017 23:29:26 -0800 Subject: Re: FreeBSD 11, Xfce, and printing To: freebsd-questions@freebsd.org References: <114d072f-9fc4-e513-90fb-409e7e277afd@holgerdanske.com> <20170123075307.89b4e6f4.freebsd@edvax.de> From: David Christensen Message-ID: Date: Sun, 22 Jan 2017 23:29:25 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170123075307.89b4e6f4.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 07:29:28 -0000 On 01/22/17 22:53, Polytropon wrote: > On Sun, 22 Jan 2017 19:50:37 -0800, David Christensen wrote: >> I wanted to print a document today. I went looking for: >> >> Application Menu -> Settings -> Printing >> >> >> It does not exist. All I see is: >> >> Application Menu -> Settings -> Xfce 4 Printing System Settings >> >> >> CUPS is missing from the left-hand pane. > > Is CUPS installed Thanks for the reply. Apparently, yes: toor@freebsd:/root # pkg info cups | head -n 4 cups-2.2.1 Name : cups Version : 2.2.1 Installed on : Mon Jan 16 15:57:43 2017 PST > and enabled? How is CUPS enabled? No, wait, let me guess -- /etc/rc.conf? But, is it running? toor@freebsd:/root # ps -A | grep -i cups 13962 0 R+ 0:00.00 grep -i cups Apparently, yes. STFW yields some hits: 1. This one mentions /etc/rc.conf (lucky guess). And other stuff. I wonder if it is applicable to FreeBSD 11.0, or will I screw up my system? https://www.freebsd.org/doc/en/articles/cups/article.html Last modified on 2015-04-04 23:31:59Z by eadler. Next, add two lines to /etc/rc.conf as follows: cupsd_enable="YES" devfs_system_ruleset="system" 2. I don't see a date. Shorter. Looks similar to the above: https://www.freebsd.org/doc/en/articles/cups/printing-cups-configuring-server.html Next, add two lines to /etc/rc.conf as follows: cupsd_enable="YES" devfs_system_ruleset="system" 3. No mention of devfs, and older: http://www.freebsdwiki.net/index.php/CUPS If you want CUPS to start at boot time, add the line cupsd_enable="YES" to /etc/rc.conf. This page was last modified on 17 December 2014, at 17:13. > Open a web broser and go to http://localhost:631, this is the > web configuration interface for CUPS, the preferred method to > interact with the beast. :-) Unable to connect Firefox can’t establish a connection to the server at localhost:631. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer’s network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. I guess that confirms CUPS is not configured correctly. > It seems that Xfce doesn't have a proper integration for CUPS, > at least the FreeBSD version hasn't. Works OOTB on Debian 7. >> When I try to print from within LibreOffice Writer, the choices >> available in the Print dialog are not encouraging: >> >> Print to File... >> Generic Printer > > This indicates that no printers are configured for your system. > The "generic printer" is the system's default printing queue > which will probably happily accept print jobs, but will not do > anything with them because there is no printer configured. If > you have CUPS installed and enabled, it will take the place of > the system's printing subsystem. I didn't think it would work. >> So, I installed: >> >> xfce4-print >> >> >> Which said: >> >> ===> NOTICE: >> >> This port is deprecated; you may wish to reconsider installing it: >> >> Depends on unmaintained x11-toolkits/libxfce4gui. > > Then don't use it. It isn't required anyway. Use the web > interface instead as suggested in the CUPS documentation. I prefer Xfce Application Menu -> Settings -> Printing. >> Application Menu -> Settings -> Printing still does not exist, and the >> LibreOffice Writer Print dialog still does not look encouraging. > > OpenOffice has a stand-alone printer management tool symlink > called /usr/local/bin/openoffice.org-3.3.0-spadmin, and > LibreOffice has something similar; search for "spadmin", > that will be the right one. > > First configure CUPS using the web interface, then run that > program to make LO aware of the printer. It should work then. I prefer Xfce Application Menu -> Settings -> Printing. > The last time I configured CUPS + LO printing was more than > 3 years ago, and I forgot everything... ;-) That's why I take a lot of notes and put them into CVS. >> Any suggestions for getting CUPS working? > > Allow me to point you to the relevant sources: > > https://www.freebsd.org/doc/handbook/printing.html > > https://www.freebsd.org/doc/en/articles/cups/ > > http://www.wonkity.com/~wblock/docs/html/lpdprinting.html The first and third appear to cover old-school printing. The second is one I also found STFW. It looks like the best of them all. I guess I'll give it a try. > (Hopefully) helpful sidenote: > > Make yourself familiar with the CUPS commands lpq, lpr, lprm, > cupsaccept, and cupsenable. Check the location of the CUPS > log files in /var/log, especially the error log file. It will > significantly help you at troubleshooting. > > What you should get when you've configured everything correctly, > for example: > > % lpq > Laserjet is ready > no entries > > % lpr import.pdf > % lpq > Laserjet is ready and printing > Rank Owner Job File(s) Total Size > active poly 4929 import.pdf 73728 bytes > > The web interface also has the ability to check those (as well > as partial error messages in case the printer doesn't print), but > using the CLI tools is much more convenient. I'll keep that handy. David