Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2017 23:29:25 -0800
From:      David Christensen <dpchrist@holgerdanske.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD 11, Xfce, and printing
Message-ID:  <e1949ee6-ae2e-866d-bf37-dbd5b828732a@holgerdanske.com>
In-Reply-To: <20170123075307.89b4e6f4.freebsd@edvax.de>
References:  <114d072f-9fc4-e513-90fb-409e7e277afd@holgerdanske.com> <20170123075307.89b4e6f4.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e1949ee6-ae2e-866d-bf37-dbd5b828732a>