Date: Mon, 23 Jan 2017 08:59:40 +0100 From: Polytropon <freebsd@edvax.de> To: David Christensen <dpchrist@holgerdanske.com> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 11, Xfce, and printing Message-ID: <20170123085940.0f118df2.freebsd@edvax.de> In-Reply-To: <e1949ee6-ae2e-866d-bf37-dbd5b828732a@holgerdanske.com> References: <114d072f-9fc4-e513-90fb-409e7e277afd@holgerdanske.com> <20170123075307.89b4e6f4.freebsd@edvax.de> <e1949ee6-ae2e-866d-bf37-dbd5b828732a@holgerdanske.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 22 Jan 2017 23:29:25 -0800, David Christensen wrote: > 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 Good. It's simply worth checking out the fundamental steps for printing, so _that_ cannot be the problem. :-) > > and enabled? > > > How is CUPS enabled? No, wait, let me guess -- /etc/rc.conf? Correct: cupsd_enable="YES" will do the trick. In order to get the permission stuff right, devfs_system_ruleset="system" will also be needed. > But, is it running? > > toor@freebsd:/root # ps -A | grep -i cups > 13962 0 R+ 0:00.00 grep -i cups > > > Apparently, yes. Apparently, no. Read with attention: You are seeing the grep (!) process (searching for the word "cups"), not CUPS itself. As root: # ps ax | grep "cupsd" 1725 ?? Is 0:00.77 /usr/local/sbin/cupsd -C /usr/local/etc/cups/cupsd.conf 2543 2 S+ 0:00.00 grep cupsd The first line indicates the actual CUPS daemon running. > 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" That is correct. > > 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. You usually get this message if CUPS is _not_ running, or if networking is a little bit messed up. Check a few things: Does /etc/hosts have a line for localhost? Can you connect to 127.0.0.1:631? > I guess that confirms CUPS is not configured correctly. I think so, too. > > It seems that Xfce doesn't have a proper integration for CUPS, > > at least the FreeBSD version hasn't. > > Works OOTB on Debian 7. That's why I said _FreeBSD_ version. Note that Xfce is ported to FreeBSD from Linux, and those are different operating systems. > >> 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. No matter what _you_ prefer, CUPS prefers the web interface, so you should better do what the software wants you to do. ;-) You can easily add a menu item that opens the default web browser with the CUPS web interface. Note that you can also use CLI tools like lpadmin for the printer configuration, but personally I find them rather inconvenient for a "do once, then forget" kind of task. > >> 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. CUPS doesn't. :-) > > 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. I also usually do this, but due to "human pressure" I didn't do it at _that_ time when I got the impossible working (two crappy USB printers with CUPS). I know there are some hand- written notes somewhere, but I can't find them at the moment. It's the kind of stuff you need every 5-10 years just to discover that your notes are outdated and don't work anymore with current systems. :-) > >> 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. Well, I find system lpd + printer filter very appealing when it comes to real printers (that understand PS). It's so much easier, no web interface needed, works without trouble all the time - but heavily depends on the printer. > The second is one I also found STFW. It looks like the best of them > all. I guess I'll give it a try. It more or less tells you to go to localhost:631 and follow the instructions there. :-) > > (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. A few other commands that you might note: lpadmin, lpstat, lpinfo. When you've done your configuration right, i. e. printer is installed, enabled, accepts jobs, the CLI tools should tell you that quickly (other than "^P + trial & error + web browser"). :-) PS. Remember the LibreOffice printer setup. If I remember correctly, this step is also required. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170123085940.0f118df2.freebsd>