Re: Can you ACTUALLY print from FreeBSD?
- From: Gonzalo Nemmi <gnemmi@xxxxxxxxx>
- Date: Sat, 25 Apr 2009 02:05:25 -0300
On Monday 20 April 2009 11:58:39 am Keith Seyffarth wrote:
I'm trying to print from my FreeBSD machine. I've been through a
number of online tutorials and instructions on printing from Unix or
FreeBSD in particular, but they all seem to start with the assumption
that printing from the machine is possible. I'm trying to get to that
starting point.
I have installed:
cups-base-1.3.9_3 Common UNIX Printing System
cups-pdf-2.5.0 A virtual printer for CUPS to produce PDF files
cups-pstoraster-8.15.4_2 Postscript interpreter for CUPS printing to
non-PS printers gutenprint-cups-5.1.7_3 GutenPrint Printer Driver
libgnomecups-0.2.3_1,1 Support library for gnome cups admistration
hplip-2.8.2_4 Drivers and utilities for HP Printers and
All-in-One device
The printer I'm working with is a HP Officejet 4110.
Hello Keith !
Ok .. first and to answer the topic: Yes, I can, and it has been that
way since day 1 with FreeBSD in here.
Your printed seems to be supported by hplip ...
http://hplipopensource.com/hplip-web/models/officejet/officejet_4100_series.html
There seem to be several issues with printing. First, since this is a
USB printer,
And so it's mine (an Hp LaserJet 1015)
the pinter is always owned by root:operator with read
permissions for user, group, and world.
Adding these lines to /etc/devfs.conf
link ulpt0 printer
own ulpt0 cups:cups
perm ulpt0 0666
Maybe you should have taken a look at the hplip post install message ...
Here, take a look at this:
[gonzalo@inferna ~]% pkg_info -xD hplip
Information for hplip-2.8.2_3:
Install notice:
**********************************************************
**************** UPGRADE FROM 1.X NOTICE *****************
NOTE: If you are upgrading from 1.x you will need to
change your devfs ruleset as hpiod is now gone, so remove
it from you rc.conf. The printer communication now runs
through cupsd. You will need to make the devfs ruleset
changes to allow cups to access the usb bus and ugen
devices so that it can enumerate the printers. You will
also need to update your hplip.conf. See the instructions
below.
**************** UPGRADE FROM 1.X NOTICE *****************
Add the following to your rc.conf:
hpssd_enable="YES"
So all you have to do if you have a custom ruleset setup
is add the following to that ruleset in devfs.rules:
add path 'usb*' group cups
add path 'usb*' mode 0660
add path 'ugen*' group cups
add path 'ugen*' mode 0660
If you have never setup devfs.rules please read the
manpage and see:
http://am-productions.biz/docs/devfs.rules.php
The printer MUST attach as a ugen(4) device. This means
that you must NOT have "device ulpt" in your kernel and
ulpt must NOT be loaded as a kernel module.
If you are seeing device connection errors restart the
printing chain with the following command. NOTE: It MUST
be restarted in the stated order.
%%PREFIX%%/etc/rc.d/hpssd restart && \
%%PREFIX%%/etc/rc.d/cupsd restart
If upgrading from a version < 2.7.9 copy the new
hplip.conf.sample config.
cp %%PREFIX%%/etc/hp/hplip.conf.sample \
%%PREFIX%%/etc/hp/hplip.conf
If you are still having problems check:
http://am-productions.biz/docs/hplip.php
If you are still having problems send the relevant part
of your /var/log/messages, console output from the hp-*
utility that you are trying to run, and your rc.conf +
devfs.rules files and the output of "ls -l /dev" to the
maintainer.
**********************************************************
[gonzalo@inferna ~]%
So .. basically .. get rid of "ulpt" ... recompile your kernel if you
have to, but get rid of it .. the printer MUST attach as a ugen(4)
device ...
Plug your printer in, turn it on and .. add this lines to devfs.rules
(change the "[system=10] " to suit your needs if you have to)
[system=10]
add path 'usb*' group cups
add path 'usb*' mode 0660
add path 'ugen*' group cups
add path 'ugen*' mode 0660
after that, issue the following commands:
cp /usr/local/etc/hp/hplip.conf.sample /usr/local/etc/hp/hplip.conf
/etc/rc.d/devfs restart
/usr/local/etc/rc.d/hpssd start
/usr/local/etc/rc.d/cupsd start
log in to the cups config page and follow the steps to configure your
printer ...
when prompted for a printer URI, make use of hp-makeuri to determine
what URI you should use .. I use it like this:
hp-makeuri printer_serial_number
and it will return something along this way:
hp:/usb/hp_LaserJet_1015?serial=MYSERIALGOESINHERE
feed that to the URI field and then move on to choose the ppd file which
you'll be able to find under /usr/local/share/ppd/HP ...
And that's about it ..
will set the ownership to cups:cups and the permissions to read and
write for user, group, and world on startup if the printer is already
turned on and plugged in. However, if the printer is not turned on at
startup, or if it is disconnected or turned off after system startup,
ownership and permissions revert.
Trying chown or chmod to the device at /dev/ulpt0 gives an invalid
path error, and trying to do so following the instructions in the man
page for devfs give 'operation not supported by device' errors.
When th device is owned by root, attempting to print the test page
generates a 'permission denied' error in CUPS. When the device is
owned by cups, attempting to print the test page generates a "failed"
error in CUPS.
As mentioned in the after install notes, forget ulpt ... hplip needs the
printer attached using ugen. ultp shouldn't even be loaded in the
kernel as a module !
When the device is owned by cups, this error is reported in the error
log in CUPS, if debug logging is enabled:
[CGI] /usr/local/share/cups/drivers/pscript5.dll: No such file or
directory
There isn't a drivers directory in /usr/local/share/cups. I can make
one, but where do I get the pscript5.dll, and what else is it going
to rely on?
CUPS et al were installed using portinstall, and CUPS is working well
to produce .pdf files. I tried portupgrade last night on all the (I
think) relevant ports, but the system thinks they are all up to date.
So, questions:
1. how can I get permissions on the device to stick, so that I do not
have to reboot the machine every time we want to print or have to
power cycle the printer?
Add this lines to devfs.rules (change the "[system=10] " to suit your
needs if you have to)
[system=10]
add path 'usb*' group cups
add path 'usb*' mode 0660
add path 'ugen*' group cups
add path 'ugen*' mode 0660
then issue the following command:
/etc/rc.d/devfs restart
2. Am I correct that the missing .dll (that seems awfully Windows to
me) is the problem in getting a filter to print? If so, what do I
need to do to install it?
You shouldn't need any dll at all .. :
[gonzalo@inferna ~]% ls /usr/local/share/ppd/HP/ | grep officejet_4100 |
sort
hp-officejet_4100_series-hpijs.ppd.gz
that's all you need ...
And, actually, a third printing-related issue: How do I get cupsd to
start on startup? I have these two lines in /etc/rc.conf:\
cupsd_enable="YES" # enable cups printing management
devfs_system_ruleset="system" # something else they say cups needs
I have this three lines on my /etc/rc.conf file:
devfs_system_ruleset="system"
hpssd_enable="YES"
cupsd_enable="YES"
but CUPS has to be manually started by root after each reboot. what
else needs to be done to get cupsd to start at startup?
After adding those lines to your /etc/rc.conf file .. theoretically ..
nothing ... hpssd and cupsd should be enabled by default on every
boot ..
Keith
Hope that helps !
Kind regards :)
--
Blessings
Gonzalo Nemmi
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- References:
- Can you ACTUALLY print from FreeBSD?
- From: Keith Seyffarth
- Can you ACTUALLY print from FreeBSD?
- Prev by Date: Re: freebsd vs. pc-bsd
- Next by Date: Re: how to deceive programs as if I were a local user?
- Previous by thread: Re: Can you ACTUALLY print from FreeBSD?
- Next by thread: esxi and freebsd vlans
- Index(es):
Relevant Pages
|