Printer setup
15 August 2005

Summary

There are several different printing systems in Linux, and I've now explored two. The LPD (aka BSD) system is older and more primitive; it doesn't have as good drivers for my printer as the newer CUPS. CUPS can be controlled through a browser, with a very elegant interface.

As of 15 September 2002, CUPS is working fine -- this is on the 2.4.19-ac4 kernel with the correct (and updated) USB components. In fact, I can use Tim's S9000 remote printer -- they both show up in KDE's control panel and in all applications that print.

Use "lpoptions -d <printer>" to set up the default CUPS printer, Mozilla will use it.

Note that Opera reads the /etc/printcap file, while cupsd generates /var/run/cups/printcap and possibly even removes the /etc/printcap file. Just adding this symlink will work -- I've not tested if cupsd will remove it:

ln -sf /var/run/cups/printcap printcap

The next thing to do is to export the printer so that it will be seen on the Samba network.

2004-06-18: Mozilla-firefox is now using the xprt server from xprtorg (the one from xfree86 is called xprt and is currently not working with Mozilla). Use the esau-600 driver -- the esau-turboprint driver is set for 30% size. I don't know how to control the xprt driver -- editing /etc/mozilla-firefox/pref/unix.js didn't work (perhaps I needed to restart xprt with just restart xprint -- no, still no effect.

Software

  • Use http://127.0.0.1:631/ to add a new CUPS printer
    • or KDE's Control Center
  • printconf -- Debian package, from foomatic -- automatically configures usb and parallel printers with cups
  • ~/.kde/share/config/kdeprintrc
  • just purge kdeprint && just install kdeprint kde-core kdebase (cleaned Tord's problem June 2005)
  • CUPS
    • cupsys cupsys-client cupsys-driver-gimpprint
    • cupsys-bsd must be installed and enabled for OpenOffice printing
    • foomatic-bin foomatic-db foomatic-db-engine foomatic-db-gimp-print foomatic-db-hpijs foomatic-filters
  • the printer panel within the KDE control center is useful for managing networked printers (don't use foomatic-gui, the gnome equivalent)
  • hplip -- HP Linux Printing and Imaging System (in Debian)
  • XPP is installed and appears to work -- graphical printer panel for CUPS, for printing files directly
  • xprint recommended (required?) for printing from Mozilla
    • in Mozilla, browse to "about:config" to make changes to the setup
  • pconf-detect, nmap,  and smbclient can be useful for automatic detection of networked printers

Guides

Commands

cupsenable enable printing
cupsdisable disable printing
foomatic-gui set up a new printer
lpoptions -d <printer>
set up the default CUPS printer
lppasswd -a steen
give a user access to cups (for what?)
lpstat -t reports on printer devices and availability
lpstat -t -h graywhale report on printers on a remote system
just restart cupsys to reload the /etc/cups/cupsd.conf file
sudo /usr/lib/openoffice/program/spadmin OOo printer manager
kprinter myimage.jpg  print any file from X
lpr <filename> print any file from CLI (pass -P parameter for printer name)
pconf-detect
command-line utility for detecting local and networked printers
defoma-psfont-installer define fonts for the printer
just reconfigure foomatic-filters
cat /var/log/cups/error_log
See error messages
/etc/cups
configuration files

Permissions

KDE's print manager (can be started with "kcmshell printmgr") doesn't allow the user that created a print job to delete it. The file is in /var/spool/cups, and only root is allowed to remove it:
-rw-r----- 1 root lpadmin 136372 Nov 23 14:32 d00424-001
How can you change these permissions so that at least lpadmin members can remove it? Then you can make the common user a member of the lpadmin group:
adduser steen lpadmin
So that narrows the problem.

Cups is configured in /etc/cups/cupsd.conf -- I asked for guidance on Ubuntu forums.

Print options using CUPS

When the printer queue(s) are installed, you can issue options to lpr from the command line.

An entire and hard-to-read list of options for a queue print can be obtained by

lpoptions -p print -l

However, the most useful options are probably the following:

  • -o landscape
  • -o sides=two-sided-long-edge
  • -o sides=two-sided-short-edge
  • -o Staple=1PLU for putting 1 staple in the Left Upper corner of a Portrait-oriented document.
  • -o Staple=None for not putting in any staples.
  • -#n -o Collate=True, where n (Copies are normally not collated for you)
  • -o media=A3
  • -o number-up=n for placing n document pages on each printed page, where n=1, 2, 4, 9 or 16.

You can set your favorite default settings using printconf (or CUPS), or by using the lpoptions command like this:

lpoptions -p print -o sides=two-sided-long-edge -o Staple=1PLU

Tip: If you find some of the options do not seem to take effect when printing a Postscript file, try "cleaning" the file first by putting it through ps2ps.

Source

Files
  • Installed printers have PPDs in /etc/cups/ppd
  • Permissions are given in /etc/cups/cupsd.conf -- only local by default! See 17 July 2003 changes
  • /etc/init.d/cupsys is used for starting and stopping CUPS
  • package cupsys-bsd is needed for OpenOffice
  • /etc/mozilla-firebird/pref/unix.js  -- add printers
  • /etc/cups/ -- several files
    • /var/run/cups/printcap

Printers

  • The printer in 3131 Hershey is an HP LaserJet 2300n at 128.97.185.106:9100. Inspect it at http://128.97.185.106:631. I'm trying protocol setting "raw" (which works for OpenOffice and KPDF) and the Postscript driver (recommended for this model).
  • The Canon ImageRunner 6000 copier/printer is at http://128.97.185.197:631 -- in the Add Printer Wizard select "Network printer (TCP)" and use port 631. Get a WinNT driver from the Canon ir6000 site -- I may need a 64-bit version for amd64, but got the 32-bit iR5000_6000-PPD_1.81_Windows.exe
  • My own Brother HL-1450 likely needs a new cartridge (or some way of cleaning the old)
  • There are other printers on the 128.97.185 subnet -- kprinter will scan for them if prompted. Find out the ip address of the new photocopier/scanner/printer -- it's likely not 128.97.185.222, as I sent a trial print job with no result. I also tried unplugging the ethernet cable and didn't see any of the printers that show up in kprinter disappear.

Installation instructions

KDE and CUPS

Plug in the printer and use the kcontrol panel's printer component to install it -- select "New printer" and follow the instructions. If you want to share the printer with others on the network, you just need to make a small change in the CUPS configuration file, or in some case just restart CUPS. If this is a freshly configured machine, issue

cp /mantaray/config/etc/cups/cupsd.conf /etc/cups
just restart cupsys

If it's an already configured machine, it's enough to issue "just restart cupsys" and the printer should be visible and available to the whole network.

OpenOffice applications

OpenOffice applications will see the networked printers if you install the cupsys-bsd package and say "yes" to the configuration question. You can use this setup to pick a default one:

sudo /usr/lib/openoffice/program/spadmin

The printers won't automatically be available in the printer panel. If you've installed a new printer you don't see, press "New Printer" and then "Add a printer" and then simply "Generic Printer". In the "Choose a command line" dialog you'll see all the networked printers; pick the one you just installed, and then give it a meaningful name. The driver will be supplied by CUPS.

I've added icons for Laura and Andrey; because of sudo, the program will run as user root.

In addition, for some purposes -- or maybe just for redundancy -- it may be useful to tell OpenOffice to use the KDE printer list; you can add it by the same procedure as above, just pick "kprinter" (the KDE printer program) for our command line and call it "KDE Printer Panel".

Note that you can also set "kprinter" as the default print command in other applications.

Mozilla and Firebird

Edit /etc/mozilla-firebird/pref/unix.js by adding printers to it.  If that doesn't work, define "kprinter" as the only printer and "kprinter --stdin" (or possibly just "kprinter") as the PostScript printer command.

This configuration file can then be copied to /mantaray/config and from there to all nodes using the scripts (done on 28 September 2003).

The default printer command in Firebird is

lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}
which means, "if the variable MOZ_PRINTER_NAME exists, then use that as the printer name, otherwise print to the default printer."

To set this variable, issue this as user root (or on all machines through the /scripts/users scripts -- the variable is per user, not per computer):

export MOZ_PRINTER_NAME=DeskJet_882C
To test that you set it successfully, issue "echo $MOZ_PRINTER_NAME". Of course this will get erased on reboot; you could perhaps put it into /etc/init.d/bootmisc (don't bother until you know this actually works).

Printing is supposed to work after installing the xprt-xprintorg package -- this is a bit of a hack, at least in Mozilla 1.4.

Each user can also set his or her printer preferences in her profile page (it goes into prefs.js):

  • Select File | Print
  • Click on "Properties"
  • In the "Print command" field, you may see this:
    "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" or simply "lpr" -- delete the whole thing
  • Instead, enter one of these (the quotes may not be required -- test first):
    • lpr -P "DeskJet_882C"
    • lpr -P "Brother_HL760"
    • lpr -P "Dolphin_DeskJet"
    • kprinter -- stdin
  • Browse to "about:config" to make changes to the profile page prefs.js
  • For more information see http://www.mozilla.org/unix/customizing.html#prefs

For a current list of printer names, issue "lpstat -t". This method uses the lpr command from cupsys-bsd.

The file where printer preferences are stored, ~/.firefox/profile/prefs.js or ~/.mozilla/default/*.slt/prefs.js, can in principle be propagated to all users, as long as the users have established a profile.

Other applications

The Common Unix Printer System (CUPS) writes its list of printers to /var/run/cups/printcap -- this is what KDE is reading. However, some applications still use the old location /etc/printcap.

To handle this, add a symbolic link from /etc/printcap to /var/run/cups/printcap:

cd /etc
ln -sf /var/run/cups/printcap printcap
You should now see the normal list of printers also in these applications. 

Finally, to maintain compatibility with all programs, it may be worth installing the cupsys-bsd package and responding 'yes' to the question, "Do you want to set up the BSD lpd compatibility server?" -- this would also work for OpenOffice. However, using kprinter is better since it shows you all available printers, it doesn't just print to a default.

Trevi's chroot

I installed cupsys-client (which has /usr/bin/lp) and some other cupsys apps in the chroot, and kprinter shows it sees the printers defined in the main root -- not sure how this works, but it does. This means I can print from acroread, using the printcommand /usr/bin/lp. Tested and works.

Complications: I don't know if it works because cupsys-driver-gutenprint was installed in chroot or not -- if it is installed, it starts its own cupsd, which likely interferes with the main root's cupsd. For instance, trying to start or stop cupsys in root will produce errors, since it's really running from chroot. Try just removing cupsys-driver-gutenprint from chroot; if you lose the ability to print ask advice.

Printer fonts

To define fonts for the printer, issue

defoma-psfont-installer

I pointed it to /usr/share/cups/model/Brother/HL-1250-hl1250.ppd and defined Roman as General Family.

"The hintfile for PostScript Printer fonts is created as: /etc/defoma/hints/defoma-ps.hints. You can change the hints of the fonts by editing the file."

Installation history

13 October 2006

After an update, the server was again not found, and I reverted the change below (just removed those lines from /etc/kde3/kdeprintrc).
That fixed the problem.

18 July 2006 -- server not found

I ran into the problem that KDE looks for the print server at a /var/run port and finds nothing. Fix: add this to /etc/kde3/kdeprintrc:

[CUPS]
Host=localhost
InstallDir=
Login=
Port=631
SavePassword=false
Restores normal functionality.

6 May 2004 update

For some reason the hl1250 driver stopped working. Turboprint and postscript drivers work fine.

OpenOffice printing

25 September 2003 update

After reinstalling all packages (I had deleted files in /usr/share), printing from ooWriter failed. When OpenOffice starts, it looks for /usr/sbin/lpc, which is found in various packages.

I discovered a help page that refers to the OpenOffice printer admin (this is pretty crazy):

cd /usr/lib/openoffice/program
./spadmin
You get a facility for adding printers -- but the list of printers is its own, and didn't include my Brother printer. So use these directories for adding printers:
/usr/share/turboprint/ppd/
However, an alternative is to just pick a random printer, and when asked for which command to send to the printer, write "kprinter" -- that way it switches you to the kprinter dialogue, which contains all the printers.

A truly horrible configuration problem.


CUPS

23 November 2002 update

On 23 November 2002, I tried to export the HL-1450 printer to Samba, with no luck. Note that there is a conflict between the VMware samba server and Spello's own samba server: the former requires the line " socket address = 128.97.184.152" in /etc/samba/smb.conf, while the latter will be unable to use the loopback device if this is present -- that is to say, smbclient -L localhost will fail.

I have been trying to add a CUPS printer to samba, which probably is the way to go -- that way we can all share printers. However, it may be too tricky to get that to work on Spello. For adding a BSD-style printer, see http://www.tldp.org/HOWTO/SMB-HOWTO-9.html

Here is the recipe for adding a CUPS printer to Samba.

cupsaddsmb is the program that lets you add cups printers to the samba network. Here is the information from man cupsaddsmb:

ADOBE POSTSCRIPT DRIVERS FOR WINDOWS

cupsaddsmb uses the Adobe PostScript
printer drivers for Windows, which are available for download from the
Adobe web site (http://www.adobe.com). Once you have extracted the driver
files, create a "drivers" directory in the CUPS data directory (usually
/usr/share/cups) and copy the Adobe files using UPPERCASE filenames, as
follows:

ADFONTS.MFM
ADOBEPS4.DRV
ADOBEPS4.HLP
ADOBEPS5.DLL
ADOBEPSU.DLL
ADOBEPSU.HLP
DEFPRTR2.PPD
ICONLIB.DLL
PSMON.DLL

I did this. What stopping me now is that I don't have the right password for root to access localhost through samba -- no idea what's going on.

I've set smbpasswd -a root but this makes no difference. Here's the content of my /etc/samba/smb.conf file, as prescribed in man cupsaddsmb:

[global]
printing = cups
load printers = yes
printcap name = cups

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0600
printable = Yes
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root

[print$]
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root

The log file is /var/log/samba/. Part of the difficulty here is isolating the variables. I asked the password question on the samba mailing list at http://lists.samba.org/mailman/listinfo/samba on 23 November 2002 but nobody replied. Apparently you don't need to copy the Brother HL1450 PPD file from spellowin:/c:/windows/system to spello:/usr/share/cups/ppd (a new directory) -- cf. http://info.ccone.at/INFO/Samba/cups.html

Note that you can browse your printers here: http://localhost:631/printers/ (user root only)

Note that if I do this, the usual root password works fine, I get the vmware interfaces, and I get the printers, all nicely lined up.

root@spello:/var# smbclient -L localhost
added interface ip=128.97.184.152 bcast=128.97.184.255 nmask=255.255.255.0
added interface ip=192.168.120.1 bcast=192.168.120.255 nmask=255.255.255.0
added interface ip=192.168.222.1 bcast=192.168.222.255 nmask=255.255.255.0
added interface ip=172.16.61.1 bcast=172.16.61.255 nmask=255.255.255.0
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.3a-6 for Debian]

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
IPC$ IPC IPC Service (Samba 2.2.3a-6 for Debian)
ADMIN$ Disk IPC Service (Samba 2.2.3a-6 for Debian)
Brother_HL-14 Printer BROTHER HL-1450
MFC_8300 Printer MFC-8300
S9000 Printer S9000

Server Comment
--------- -------
LOCALHOST Samba 2.2.3a
SPELLO Samba 2.2.3a-6 for Debian

Workgroup Master
--------- -------
WORKGROUP LOCALHOST


It's not, however, respecting workgroup name SUNRISE, set in spellowin.
This makes me think, however, that the password situation could have
something to do with vmware.

Neither gubbio nor cyberspace will accept the usual password.

You could try LinNeiborhood for a Samba Gui: http://www.bnro.de/~schmidjo/index.html

Here's gubbio after all -- it works when smbclient is running under user steen:

steen@spello:~$ smbclient -L gubbio
added interface ip=128.97.184.152 bcast=128.97.184.255 nmask=255.255.255.0
added interface ip=192.168.120.1 bcast=192.168.120.255 nmask=255.255.255.0
added interface ip=192.168.222.1 bcast=192.168.222.255 nmask=255.255.255.0
added interface ip=172.16.61.1 bcast=172.16.61.255 nmask=255.255.255.0
Password:
Domain=[SUNRISE] OS=[Unix] Server=[Samba 2.2.1a]

Sharename Type Comment
--------- ---- -------
dvd Disk Linux DVD
IPC$ IPC IPC Service (Samba 2.2.1a)
ADMIN$ Disk IPC Service (Samba 2.2.1a)
lp Printer
MFC_8300 Printer
printer1 Printer
S9000 Printer
steen Disk Home Directories

Server Comment
--------- -------
CYBERSPACE Samba 2.2.1a
MUTT Samba 2.2.1a

Workgroup Master
--------- -------
SUNRISE CYBERSPACE

And here's cyberspace likewise:

steen@spello:~$ smbclient -L cyberspace
added interface ip=128.97.184.152 bcast=128.97.184.255 nmask=255.255.255.0
added interface ip=192.168.120.1 bcast=192.168.120.255 nmask=255.255.255.0
added interface ip=192.168.222.1 bcast=192.168.222.255 nmask=255.255.255.0
added interface ip=172.16.61.1 bcast=172.16.61.255 nmask=255.255.255.0
Password:
Domain=[SUNRISE] OS=[Unix] Server=[Samba 2.2.1a]

Sharename Type Comment
--------- ---- -------
dvd Disk Linux DVD
IPC$ IPC IPC Service (Samba 2.2.1a)
ADMIN$ Disk IPC Service (Samba 2.2.1a)
MFC_8300 Printer
S9000 Printer
steen Disk Home Directories

Server Comment
--------- -------
CYBERSPACE Samba 2.2.1a
MUTT Samba 2.2.1a

Workgroup Master
--------- -------
SUNRISE CYBERSPACE
WORKGROUP LOCALHOST

Note that cyberspace picks up on both workgroups.

So Samba is doing stuff, and I did succeed in making it link up very nicely with the other 'puters, but I failed in making the printer available for other samba clients.

The method for achieving this is truly obscure, but the trouble I ran into is even more obscure -- blocked by a password I don't know where to set.

19 November update

On 19 November 2002, I discovered Opera couldn't find the newly installed CUPS printer (which is now working fine with the pixelmono driver). Opera looks in /etc/printcap, and CUPS hasn't updated it. I found the following on the web:

CUPS only writes a printcap if /etc/cups/cupsd.conf has a "Printcap /etc/printcap" directive. CUPS itself doesn't need one. It only provides it for convenience of legacy apps who "go on print strike" if they don't see one.

I made the suggested change to /etc/cups/cupsd.conf, and the printer show up in Opera, but nothing is actually printed. Konqueror prints fine.

On 18 November 2002, I opened the Libranet Xadminmenu and selected "Install the CUPS printing system". It installed fine, saying I need can use the adminmenu to configure it, or go to http://localhost:631. Note that I had to mount the drive on /mnt/dvd and add a symlink /cdrom --> /mnt/dvd. I also added a symlink from /dev/cdrom to /dev/hdc. Anyway, I did this, mounted the drive, and then the adminmenu script found it. The printout was as follows:

Removing gnulpr ...
Removing printtool ...
Removing lpr-ppd ...
Stopping printer spooler: lpd.
dpkg - warning: while removing lpr-ppd, directory `/var/spool/lpd' not empty so not removed.
Selecting previously deselected package libslp1.
(Reading database ... 103150 files and directories currently installed.)
Unpacking libslp1 (from .../libslp1_1.0.8a-2_i386.deb) ...
Selecting previously deselected package gs-esp.
Unpacking gs-esp (from .../gs-esp_7.05.4-1_i386.deb) ...
Selecting previously deselected package cupsys.
Unpacking cupsys (from .../cupsys_1.1.15-4_i386.deb) ...
Selecting previously deselected package cupsomatic-ppd.
Unpacking cupsomatic-ppd (from .../cupsomatic-ppd_0.20010420-4_all.deb) ...
Selecting previously deselected package cupsys-client.
Unpacking cupsys-client (from .../cupsys-client_1.1.15-4_i386.deb) ...
Selecting previously deselected package cupsys-driver-gimpprint.
Unpacking cupsys-driver-gimpprint (from .../cupsys-driver-gimpprint_4.2.2-pre2-1_i386.deb) ...
Selecting previously deselected package cupsys-bsd.
Unpacking cupsys-bsd (from .../cupsys-bsd_1.1.15-4_i386.deb) ...
Setting up libslp1 (1.0.8a-2) ...
ldconfig: /usr/lib/libdvdcss.so.2 is not a symbolic link

NOTE: You don't seem to have a multicast route configured. You may need to
add a multicast route by running the command:

-- and then it didn't provide the command. Finally, configuration instructions:

You can configure CUPS by pointing your web browser to: http://localhost:631/
or configure CUPS using adminmenu

On 14 September 2002 I opened Yast2 and (under Misc) switched back from BSD to CUPS printing system. This was very successful -- the local Brother HL-1450 showed up (I went through a new configuration process) and so did Tim's new printer!

However, when I rebooted, all traces of CUPS was gone, the printers didn't show up -- I had to run through Yast2 again to activate it. Once I did that, it worked fine, but how do I get it to start on its own?

In my notes from the previous CUPS installation on gubbio, I wrote:

CUPS is started by default -- should I kill it? Or can I switch off gs in some other way? gs is taking up 99% of CPU power -- it may be configured at gs.upp/ -- but no. I decided to uninstall the printer driver CUPS system, as I can't figure out why gs takes up so much CPU power. In its place is installed BSD, the lpd printer spooler.

I checked top and verified that CUPS is not taking up any CPU power now.

There is nothing on CUPS in /etc/inetd.conf -- there's a line for printer, but not through CUPS. That line is not activated on gubbio.

There's nothing on CUPS in /etc/inittab.

/etc/rc.config has this:

#
# Start printer daemon lpd? (if you use plp, you can also disable it here
# an enable it in /etc/inetd.conf) (yes/no)
#
START_LPD="yes"

and this:

#
# Should the Common UNIX Printing System be started ? (yes/no)
#
START_CUPS="yes"

It said no; I changed it to yes. I ran SuSE conf -- I think there may be some other way to reload rc.config. Hopefully this will have started CUPS on bootup and my mission in completed.

See also USB for the printer.

See if you can formulate intelligible questions here and ask them in newsgroups. Perhaps the UCLA LUG is helpful -- though they all use Ret Hat. You can also remove hld when you build a new kernel -- I thought it might help my Microsoft keyboard, but there's no reason to think it can.

Error messages in the ps -ax process list (*** marks new lines):

***626 ? S 0:00 sh -c gs '-dBATCH' '-dSAFER' '-dNOPAUSE' '-sDEVICE=hl1250' '-dEconoMode=0' '-dSourceTray=0' '-dPaperType=0' '-sOutputFile=|cat >&3' '-' 3>&1 1>&2
***627 ? S 0:00 /usr/bin/perl /usr/lib/cups/filter/cupsomatic 24 root (stdin) 1 ColorModel=Gray Resolution=1200x600
***630 ? R 94:53 gs -dBATCH -dSAFER -dNOPAUSE -sDEVICE=hl1250 -dEconoMode=0 -dSourceTray=0 -dPaperType=0 -sOutputFile=|cat >&3 -

And then below:

***1043 ? S 0:00 usb:/dev/usb/lp?vendor=04f9&prod_id=000e 25 root KDE Print Test 1
***1044 ? S 0:00 sh -c gs '-dBATCH' '-dSAFER' '-dNOPAUSE' '-sDEVICE=hl1250' '-dEconoMode=0' '-dSourceTray=0' '-dPaperType=0' '-sOutputFile=|cat >&3' '-' 3>&1 1>&2
***1045 ? S 0:00 /usr/bin/perl /usr/lib/cups/filter/cupsomatic 25 root KDE Print Test 1
***1046 ? S 0:01 gs -dBATCH -dSAFER -dNOPAUSE -sDEVICE=hl1250 -dEconoMode=0 -dSourceTray=0 -dPaperType=0 -sOutputFile=|cat >&3 -

Again, all this and nothing happens. The console in this case doesn't even say anything. Note that the printer is now beautifully recognized in KDE, but it doesn't actually get to the printer. In fact CUPS doesn't give up; the top -gs process has been running for an hour.

Narrative Jan 2002

The printer's not working -- except it works from SuSE. None of the other programs find it, however. So the logical thing to do would be to let SuSE install it and then figure out how to tell the programs where it's located!

Tools to achieve this:

   * checkpc

Checkpc is used to check for the existence and correct permissions of entries in the printcap database. It is useful when installing a new printcap database and cleaning up existing printer spoolers.

See the man file. Use -V for verbose output. Here's the first paragraph; I include the whole thing below.

  LPRng-3.7.4, Copyright 1988-2000 Patrick 
Powell, <papowell@lprng.com>
Checking for configuration files '/etc/lpd.conf'
found '/etc/lpd.conf', mod 0100644
Checking for printcap files '/etc/printcap'
found '/etc/printcap', mod 0100644
Checking for lpd only printcap files '/etc/lpd_printcap'
DaemonUID 4, DaemonGID 7
Using Config file '/etc/lpd.conf'
LPD lockfile '/var/run/lpd.printer'
checking '/var/run/lpd.printer' file
.names
:lp-raw=lp-raw
:lp3=lp-raw
:lpr=lpr
:lpr-ascii=lpr-ascii
:y2prn_lp.upp--raw-lp=lp-raw

Now, note that there are several control files, which the script lists. There's

   /etc/lpd.conf
/etc/printcap
/etc/lpd-printcap
/var/run/lpd.printer

As for the names, SuSE defines several, which is useless for me. What you should do is let SuSE define your printers, but then delete all but the main one.

I picked a "generic printer" and "a PCL-6 printer (monochrome)". Name for printing is lp. For the driver I picked pxlmono -- I could have picked ljet4 or ljet5mono. I expect all three will work fine. Resolution 600x600 -- that's not quite the 1200x600 the printer can do. Another driver might give you that though. I try 1200x1200 and ljet5 gray scale -- this may not work.

For the test page, YaST uses the command

   lpr-Plp

followed by the filename. My ljet5 grayscale 1200 sits there for ages receiving data. There's a huge slew of processes:

   1696 ? S 0:00 kdesu /sbin/yast2 printer
1697 ? S 0:00 /bin/bash /sbin/yast2 printer
1698 ? S 0:04 /usr/lib/YaST2/bin/y2bignfat
printer qt -geometry 640x480 -style=platinum -fn
-gnu-unifont-medium-r-normal--16-160-75-75-p-80-iso10646-1
1699 ? S 0:00 /usr/lib/YaST2/bin/y2bignfat
printer qt -geometry 640x480 -style=platinum -fn
-gnu-unifont-medium-r-normal--16-160-75-75-p-80-iso10646-1
1700 ? S 0:02 /usr/lib/YaST2/bin/y2bignfat
printer qt -geometry 640x480 -style=platinum -fn
-gnu-unifont-medium-r-normal--16-160-75-75-p-80-iso10646-1
2225 ? S 0:00 lpd Waiting
2269 ? S 0:00 lpd (Server) 'lp'
2275 ? S 0:00 lpd (Worker - Print) 'lp'
2276 ? S 0:00 /bin/bash /var/lib/apsfilter/bin/y2prn_lp
[etc]

Anyway, nothing comes of this test and I let YaST know. I scaled down to 600 x 600 and the ljet4 driver -- this should be a piece of cake, but the printer sits there and blinks. I reread the instructions: SuSE had said to switch off the printer and wait ten seconds between trials. After doing this, the ljet4 at 600 prints perfectly fine -- actually, the gray fill is a bit flaky and I try pxlmono. Pixelmono is definitely better, but it's also quite a bit slower.

I suddenly remember that Acroread prints perfectly fine. So the problem is not defining the printer, the problem is telling applications where the printer is. I will stick with pxlmono for now; if it's too slow, try ljet4. Or ljet5 for that matter. ljet5 also takes a while -- but it works. The result is like ljet4 -- not as good as pxlmono. So stick with that.

For some reason SuSE didn't make me define lp-ascii and lp-raw this time.

I tried a "checkpc -r -A 2S" -- that is, remove junk files older than 2 seconds. I get,

  Warning - ** cannot open '/var/spool/lpd/y2prn_lp.upp--ascii-lp/acct' 
-
'No such file or directory'
Warning - ** cannot open '/var/spool/lpd/y2prn_lp.upp--auto-lp/acct'
-
'No such file or directory'
Warning - ** cannot open '/var/spool/lpd/y2prn_lp.upp--raw-lp/acct'
-
'No such file or directory'

So it's looking for three spool files that don't exist -- ascii, auto, and raw. These were the config files listed by checkpc (cf. above):

   /etc/lpd.conf
/etc/printcap
/etc/lpd-printcap
/var/run/lpd.printer

Here's /etc/lpd.conf:

  # See "man lpd.conf" for a list of options 
you can set here.
# check_for_nonprintable
# means the 'check_for_nonprintable' option
default value is on or 1
# To set it to OFF or 0, change this to read:
# check_for_nonprintable@
check_for_nonprintable@
# If you don't want to have local spooling
(in case you wish to send the job
# to a global print server or direct to the
adressed printer) append a "@" to
# the following line:
force_localhost
client_config_file=/etc/lpd.conf
filter_ld_path=/lib:/usr/lib:/usr/X11R6/lib:/usr/local/lib
filter_path=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/
local/sbin:/usr/lib/filters:/usr/X11R6/bin
mail_operator_on_error=root
pr=/usr/bin/pr
printcap_path=/etc/printcap
# If you distribute your printcap entries
through NIS,
# use the following line instead:
#printcap_path=|/usr/lib/yp/match_printcap
printer_perms_path=/etc/lpd.perms
server_config_file=/etc/lpd.conf
server_user=lp
user=lp
group=lp
# If your printer doesn't print the job remove
the "@" from the following
# line. (for example necessary for HP4M with
a JetDirect Card)
send_data_first@

All of this looks harmless. Here's /etc/printcap:

  ### BEGIN apsfilter: ### /etc/gs.upp/y2prn_lp.upp 
lp ###
# Warning: Configured for apsfilter, do not
edit the labels!
# apsfilter setup Tue Jan 1 04:02:28 PST
2002
#
lp-ascii|lp1|y2prn_lp.upp--ascii-lp|y2prn_lp.upp
ascii:\
:lp=/dev/usb/lp0:\
:sd=/var/spool/lpd/y2prn_lp.upp--ascii-lp:\
:lf=/var/spool/lpd/y2prn_lp.upp--ascii-lp/log:\
:af=/var/spool/lpd/y2prn_lp.upp--ascii-lp/acct:\
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--ascii-lp:\
:la@:mx#0:\
:tr=:cl:sh:
#
lp|lp2|y2prn_lp.upp--auto-lp|y2prn_lp.upp
auto:\
:lp=/dev/usb/lp0:\
:sd=/var/spool/lpd/y2prn_lp.upp--auto-lp:\
:lf=/var/spool/lpd/y2prn_lp.upp--auto-lp/log:\
:af=/var/spool/lpd/y2prn_lp.upp--auto-lp/acct:\
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--auto-lp:\
:la@:mx#0:\
:tr=:cl:sh:
#
lp-raw|lp3|y2prn_lp.upp--raw-lp|y2prn_lp.upp
raw:\
:lp=/dev/usb/lp0:\
:sd=/var/spool/lpd/y2prn_lp.upp--raw-lp:\
:lf=/var/spool/lpd/y2prn_lp.upp--raw-lp/log:\
:af=/var/spool/lpd/y2prn_lp.upp--raw-lp/acct:\
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp:\
:la@:mx#0:\
:tr=:cl:sh:
##
### END apsfilter: ### /etc/gs.upp/y2prn_lp.upp
lp ###

This one can be edited down -- perhaps deleted and reconstituted. In fact, try that. But first, here's the content of /etc/gs.upp/y2prn_lp.upp:

  -supModel="Generic printers 'PCL 5e' or 'PCL 
6' printer (monochrome)"
-sDEVICE=pxlmono
-sCOLOR=mono
-r600x600
-sPAPERSIZE=letter

This is the actual definition! Of course, at this point you're heavily into YaST, and the question is can you mess with it. Better use YaST itself. I deleted the defined printer -- and /etc/gs.upp/y2prn_lp.upp disappeared, which is good. But what about printcap? Yes, that's also empty now. And checkpc -V turns up empty-handed, just listing a few empty files. So start afresh:

YaST finds the printer, defines it as lp, and uses macro pcl5e for the driver pxlmono. Printcap is back with its three names:

  lp|lp2|y2prn_lp.upp--auto-lp|y2prn_lp.upp 
auto
lp-ascii|lp1|y2prn_lp.upp--ascii-lp|y2prn_lp.upp
ascii
lp-raw|lp3|y2prn_lp.upp--raw-lp|y2prn_lp.upp
raw

or in short, lp, lp-ascii, and lp-raw. I delete the last two, just to keep things simple. That leaves this:

  ### BEGIN apsfilter: ### /etc/gs.upp/y2prn_lp.upp 
lp ###
# Warning: Configured for apsfilter, do not
edit the labels!
# apsfilter setup Tue Jan 1 04:25:05 PST
2002
#
lp|lp2|y2prn_lp.upp--auto-lp|y2prn_lp.upp
auto:\
:lp=/dev/usb/lp0:\
:sd=/var/spool/lpd/y2prn_lp.upp--auto-lp:\
:lf=/var/spool/lpd/y2prn_lp.upp--auto-lp/log:\
:af=/var/spool/lpd/y2prn_lp.upp--auto-lp/acct:\
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--auto-lp:\
:la@:mx#0:\
:tr=:cl:sh:
#
### END apsfilter: ### /etc/gs.upp/y2prn_lp.upp
lp ###

In Opera, only one printer now shows up -- and nothing happens. The SuSE system just plain isn't working. Try editing out the spool in /etc/ldp/conf -- no luck.

To query your usb tool versions, do

  rpm -qa | grep -i usb

I get:

  usbutils-0.8-8
usbview-1.0-117

To query cups tool versions, do

  rpm -qa | grep -i cups

I get

  cups-libs-1.1.10-25
yast2-agent-cups-2.4.9-7
yast2-config-cups-2.4.11-29
yast2-trans-cups-2.0.37-0

Here is SuSE's own guide for installing a USB printer:

  http://sdb.suse.de/en/sdb/html/jsmeix_print-device-usb.html

It explains how you can do it without YaST, using /var/lib/apsfilter/SETUP directly. This is still a SuSE product -- it's a whole configuration interface, like xconfig for the kernel:

This script creates a printer entry (serial, parallel, and remote printers) in /etc/printcap. Spool directories will be created under /var/spool/lpd/, filters will be linked under /var/lib/apsfilter/bin/. There is a global configuration file /etc/apsfilterrc together with printer specific configuration /etc/apsfilterrc.<gs_mode> after creating a printer entry.

In comparison, my current apsfilter in /etc/gs.upp/y2prn_lp.upp already has spool directories under

   :sd=/var/spool/lpd/y2prn_lp.upp--auto-lp:\
:lf=/var/spool/lpd/y2prn_lp.upp--auto-lp/log:\
:af=/var/spool/lpd/y2prn_lp.upp--auto-lp/acct:\

So that's clear, that's where the spool is -- perhaps you can tell KDE? SuSE's instructions say to call the printer a parallel port printer, and I do that in KDE -- it accepts it, while it rejects the USB option.

Next, I need to know where the printer drivers are -- again, in Linux you have no idea where they may be placed, or what they're called. Now, at http://www.linuxprinting.org/show_driver.cgi?driver=pxlmono, it says that "pxlmono supplies drivers for PCL 6 printers, both B&W and colour, much faster than the lj5gray/lj5mono drivers." So this is good news; it looks like I've chosen the right driver. Now where is it?

Here's details on the HL-1450: http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-1450:

  15 ppm.
Fast printing from Linux/Ghostscript.
Parallel and USB interface included.
Expandable to 36MB (72-pin SIMM).
Standard Memory: 8MB.
Printer not tested, assumed to be compatible
to the other Brother models.
Printer supports PJL.
Printer supports direct text printing with
the `us-ascii' charset.
Refill: Separate Toner and Drum
No known autodetection methods.

Recommended driver: ht1250. So, not pxlmono! On the ht1250:

"This driver handles the 1200x600 dpi mode for the Brother HL-1050/1070/1250/1270N and the 600x600 dpi mode for the Brother HL-1030/1240. It also provides some options as paper source and toner saving. It is available from Ghostscriot 6.10 on, or as a patch for gs 5.50. For the GhostScript versions already containing the driver there are patches to update to a new version (these patches are needed to get 600x600 on the HL-1030/1240 and compatible to work). Web page: http://www.amelek.gda.pl/gs-hl1250/ Execution style: Ghostscript

http://www.linuxprinting.org/show_driver.cgi?driver=hl1250

I checked my packager -- I have Ghostscript 6.51-41. This means I shouldn't need any special updates for this driver. It provides "gs-fonts" -- so this is what the ubiquitous gs means -- in the directory names above.

But SuSE doesn't show the hl1250 driver, only the hl1260. That could be better, it could be worse. In fact, in the driver selections, when it comes down to it YaST only shows pxlmono and ljet4 and 5 -- it doesn't show all the drivers, and not hl1250. I get complete death when I try to test again. I turned it off and on again, and then it worked fine. The result in fact is slightly better than pxlmono, though I didn't get the 600x1200 option.

Anyway, I've clearly found the printing experts again. There is actually a patch for my specific driver (well, for the HL-1250 and relatives) at http://www.amelek.gda.pl/gs-hl1250/ -- but it's not clear it's worth getting.

Next, printing system interfaces. There are four options listed for my driver:

   PDQ, CUPS, LPD/LPRng/GNUlpr / Spooler-less, 
and PPD

Each of these requires a script to be generated that links the specific driver to the printing system interface.

First, let's see if I can understand a bit more how the system works. The SuSE help file at http://sdb.suse.de/en/sdb/html/jsmeix_print-device-usb.html says:

Test whether the USB printer is accessible using the following command (as user root):

  echo -en "Hello\f" > /dev/usblp0

Provided the printer is connected to the USB device /dev/usblp0 you should get one sheet with the word Hello printed on it.

Well -- this was very instructive. I do get that -- a single hello -- so my printer is working! I could get it to print anything from the command line! Just by doing > /dev/usblp0. So now I know that. Very useful. But I had to wake it up first!!! Manually tap the button!

Here's to see your USB devices:

  cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=
1 Spd=12 MxCh= 2
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso=
0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=a000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=
2 Spd=12 MxCh= 4
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0451 ProdID=1446 Rev= 1.10
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=
5 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=04f9 ProdID=000e Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-1450 series
S: SerialNumber=H1J315943
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01
Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 16 Ivl= 0ms

Nice big list -- and that's after disconnecting all but the keyboard and printer! Well, checking the S: lines, you've got a UHCI Root Hub and the printer.

OK -- so this was useful, and you can use these commands to find other types of information later. I'll try moving the USB cable while the machine is on and see if the device is still there.

  cat /proc/bus/usb/devices

In fact, the all come right online -- except the scanner, which isn't powered at the moment:

  gubbio:/ # cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=
1 Spd=12 MxCh= 2
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso=
0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=a000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=
2 Spd=12 MxCh= 4
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0451 ProdID=1446 Rev= 1.10
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=
5 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=04f9 ProdID=000e Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-1450 series
S: SerialNumber=H1J315943
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01
Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 16 Ivl= 0ms
gubbio:/ # cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=
1 Spd=12 MxCh= 2
B: Alloc= 22/900 us ( 2%), #Int= 2, #Iso=
0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=a000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=
2 Spd=12 MxCh= 4
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0451 ProdID=1446 Rev= 1.10
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=
6 Spd=12 MxCh= 7
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0451 ProdID=1446 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00
Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
T: Bus=01 Lev=02 Prnt=06 Port=03 Cnt=01 Dev#=
8 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=0553 ProdID=0002 Rev= 1.00
S: Product=USB Camera
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=250mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00
Prot=ff Driver=(none)
E: Ad=81(I) Atr=01(Isoc) MxPS= 0 Ivl= 1ms
I: If#= 0 Alt= 1 #EPs= 1 Cls=ff(vend.) Sub=00
Prot=ff Driver=(none)
E: Ad=81(I) Atr=01(Isoc) MxPS= 448 Ivl= 1ms
I: If#= 0 Alt= 2 #EPs= 1 Cls=ff(vend.) Sub=00
Prot=ff Driver=(none)
E: Ad=81(I) Atr=01(Isoc) MxPS= 704 Ivl= 1ms
I: If#= 0 Alt= 3 #EPs= 1 Cls=ff(vend.) Sub=00
Prot=ff Driver=(none)
E: Ad=81(I) Atr=01(Isoc) MxPS= 960 Ivl= 1ms
T: Bus=01 Lev=02 Prnt=06 Port=05 Cnt=02 Dev#=
9 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00
MxPS= 8 #Cfgs= 1
P: Vendor=04f9 ProdID=000e Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-1450 series
S: SerialNumber=H1J315943
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01
Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 16 Ivl= 0ms

Next, try to print with echo -en "Hello\f" > /dev/usblp0. After moving the printer from "Bus or self-powered" to "self-powered only", it prints without being prompted. So we're a bit better off now.

For the moment, I won't patch in the right driver -- it's not worth it. I'll use pxlmono. Here's the driver: http://www.linuxprinting.org/show_driver.cgi?driver=pxlmono

I generated a script called lpd-o-matic.cgi and saved it in /root. The guy behind this writes:

"This system will work with any LPD that can pass either a job title (lpr option -J via filter option -j) or arbitrary options (lpr option -o, via filter environment variable LPOPTS) to a filter. This appears to cover most GNU/Linux lpd versions, and probably includes lpd versions on the BSD side as well. It will also work with LPRng (ie Red Hat 7.x).

I've got one report from a SuSE user which suggests that SuSE's LPD doesn't work. We'll need to add in cf file finding and processing to get it going there. Contributions welcome, as always... (SuSE switched to CUPS nowadays ...)

The best way to find out is perhaps just to give it a shot."

This could mean I should go with CUPS instead -- I'm getting too tired to continue this; I've sat up until 6am as usual.

Here's one piece of crucial information, though, from http://www.linuxprinting.org/lpd-doc.html. "Many drivers are included in typical distributions of Ghostscript, but some are not, and some are separate programs which run together with Ghostscript. You can see the available Ghostscript drivers on your system with `gs -h'."

So this is where the drivers are located -- inside the file gs? This is what gs -h gives me:

  GNU Ghostscript 6.51 (2001-03-28)
Copyright (C) 2001 artofcode LLC, Benicia,
CA. All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use
# in place of =)
-dNOPAUSE no pause after page | -q `quiet',
fewer
messages
-g<width>x<height> page size
in pixels | -r<res> pixels/inch
resolution
-sDEVICE=<devname> select device |
-dBATCH exit after last file
-sOutputFile=<file> select output
file: - for stdout, |command for pipe,
embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1
PostScriptLevel2 PDF
Available devices:

x11 bbox x11alpha x11cmyk x11cmyk2 x11cmyk4
x11cmyk8 x11gray2 x11gray4
x11mono x11rg16x x11rg32x appledmp iwhi iwlo
iwlq t4693d2 t4693d4 t4693d8
tek4696 ap3250 epson eps9mid eps9high epsonc
lp8000 lq850 st800 stcolor
photoex escp escpc hl1250 hl7x0 atx23 atx24
atx38 coslw2p coslwxl cdeskjet
cdjcolor cdjmono cdj500 cdj550 cdj670 cdj850
cdj880 cdj890 cdj970 cdj1600
chp2200 deskjet djet500 djet500c dnj650c
djet820c paintjet pj pjetxl pjxl
pjxl300 laserjet ljet2p ljet3 ljet3d ljet4
ljet4d lj4dith ljetplus lj5mono
lj5gray cljet5 cljet5c cljet5pr declj250
lj250 dl2100 fs600 bj10e bj200
bjc600 bjc800 lbp8 lips3 lxm5700m lex7000
lex5700 lex3200 lex2050 la50
la70 la75 la75plus ln03 lp2563 ccr cp50 ibmpro
imagen jetp3852 m8510 necp6
oce9050 oki182 oki4w okiibm r4081 sj48 xes
pbm pbmraw pgm pgmraw pgnm
pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw
pksm pksmraw plan9bm inferno
dfaxhigh dfaxlow faxg3 faxg32d faxg4 cfax
tiffcrle tiffg3 tiffg32d tiffg4
tiff12nc tiff24nc tifflzw tiffpack psmono
psgray psrgb bit bitrgb bitcmyk
mgrmono mgrgray2 mgrgray4 mgrgray8 mgr4 mgr8
cgmmono cgm8 cgm24 cif jpeg
jpeggray miff24 pcxmono pcxgray pcx16 pcx256
pcx24b pcxcmyk pngmono
pnggray png16 png256 png16m sgirgb bmpmono
bmpamono bmpgray bmpsep1
bmpsep8 bmp16 bmp256 bmp16m bmp32b pdfwrite
pswrite epswrite pxlmono

Search path:
. : /usr/share/ghostscript/6.51/lib : /usr/share/ghostscript/fonts
For more information, see /usr/share/ghostscript/6.51/doc/Use.htm.
Report bugs to bug-gs@ghostscript.com, using
the form in Bug-form.htm.

So that's that. pxlmono is in /usr/share/ghostscript/6.51/lib or possibly /usr/share/ghostscript/fonts. I see lots of files in these directories, ending in .upp or .gs, but no pxlmono or hl1250 (which is included in the list above). So where are the actual drivers?

Well, cdj is an .upp file -- so that's likely the driver extension: /usr/share/ghostscript/6.51/lib/cdj550.upp. Try pxl -- no luck.

KDE's printing manager rejects all file types in those two directories as "wrong driver format". All right -- I found it, in a lexmark driver. Drivers simply end in .c -- they're compiled programs, likely C++ files.

Not much luck here. There are thousands of .c files, and I tried one from the /usr/src SuSE kernel source, a usb printer driver, but KDE rejected it.

So I have no idea what KDE's printing manager wants. A filter perhaps? I think I tried that too.

So this was educational but so far unsuccessful. The problem is likely not in the driver at all, but in the spooling system.

Printing in Linux is quite something. I've spent all night and still don't understand how it works. Maybe you should just do CUPS.

And so I did. That's how I got the hl1250 driver and lots more goodies -- this is a clearly superior system and I should have used it from the beginning. The trick: under YaST2 | Misc, there's a Printers under CUPS setup system. That's all it took.

Well, Opera still doesn't print! It could be a kernel problem -- this is the message I get: kernel: usb_control/bulk_msg: timeout

That could be it. It's not SuSE, it's not the printing system, it's just the USB. It's erratic. It sometimes works, sometimes not.

  Use cat /proc/bus/usb/devices

Now there's the CUPS system. Documentation is at http://localhost:631/documentation.html.

man pages for:

   lpadmin, lpr, lp, lpc, lpq, lpstat, cupsd.conf, 
lprm

http://localhost:631/printers/ -- printer details

  Description: Brother HL-1450 series
Location: USB port (/dev/usb/lp?vendor=04f9?_id=000e)
Printer State: idle,
accepting jobs.

"USB port busy or printer disconnected; will retry in 30 seconds..." Device URI: usb:/dev/usb/lp?vendor=04f9?_id=000e

So this is what you're getting: the port is busy, won't print. Otherwise everything seems to be working really well, and the CUSP system is actually extremely elegant -- in effect a network admin system.

  Verbose output of checkpc -V (the whole thing):

LPRng-3.7.4, Copyright 1988-2000 Patrick
Powell, <papowell@lprng.com>
Checking for configuration files '/etc/lpd.conf'
found '/etc/lpd.conf', mod 0100644
Checking for printcap files '/etc/printcap'
found '/etc/printcap', mod 0100644
Checking for lpd only printcap files '/etc/lpd_printcap'
DaemonUID 4, DaemonGID 7
Using Config file '/etc/lpd.conf'
LPD lockfile '/var/run/lpd.printer'
checking '/var/run/lpd.printer' file

.names
:lp-raw=lp-raw
:lp3=lp-raw
:lpr=lpr
:lpr-ascii=lpr-ascii
:y2prn_lp.upp--raw-lp=lp-raw

.all
:lpr-ascii
:lpr
:lp-raw

#Printcap Information
lpr-ascii
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/lpr-ascii
:sh
lpr
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/lpr
:sh
lp-raw|lp3|y2prn_lp.upp--raw-lp|y2prn_lp.upp
raw
:af=/var/spool/lpd/y2prn_lp.upp--raw-lp/acct
:cl
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp
:la=@
:lf=/var/spool/lpd/y2prn_lp.upp--raw-lp/log
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/y2prn_lp.upp--raw-lp
:sh
:tr
Checking printcap info
Checking printer 'lpr-ascii'
Checking directory: '/var/spool/lpd/lpr-ascii'
directory '/var'
directory '/var/spool'
directory '/var/spool/lpd'
directory '/var/spool/lpd/lpr-ascii'
checking 'control.lpr-ascii' file
checking 'status.lpr-ascii' file
checking 'status' file
checking 'log' file
checking 'acct' file
Checking printer 'lpr'
Checking directory: '/var/spool/lpd/lpr'
directory '/var'
directory '/var/spool'
directory '/var/spool/lpd'
directory '/var/spool/lpd/lpr'
checking 'control.lpr' file
checking 'status.lpr' file
checking 'status' file
checking 'log' file
checking 'acct' file
Checking printer 'lp-raw'
Checking directory: '/var/spool/lpd/y2prn_lp.upp--raw-lp'
directory '/var'
directory '/var/spool'
directory '/var/spool/lpd'
directory '/var/spool/lpd/y2prn_lp.upp--raw-lp'
checking 'control.lp-raw' file
checking 'status.lp-raw' file
checking 'status' file
checking '/var/spool/lpd/y2prn_lp.upp--raw-lp/log'
file
checking '/var/spool/lpd/y2prn_lp.upp--raw-lp/acct'
file
'if' filter '/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp'
executable '/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp'
*** Checking for client info ****

.names
:lp-raw=lp-raw
:lp3=lp-raw
:lpr=lpr
:lpr-ascii=lpr-ascii
:y2prn_lp.upp--raw-lp=lp-raw

.all
:lpr-ascii
:lpr
:lp-raw

#Printcap Information
lpr-ascii
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/lpr-ascii
:sh
lpr
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/lpr
:sh
lp-raw|lp3|y2prn_lp.upp--raw-lp|y2prn_lp.upp
raw
:af=/var/spool/lpd/y2prn_lp.upp--raw-lp/acct
:cl
:if=/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp
:la=@
:lf=/var/spool/lpd/y2prn_lp.upp--raw-lp/log
:lp=/dev/usblp0
:mx#0
:sd=/var/spool/lpd/y2prn_lp.upp--raw-lp
:sh
:tr
Checking printer 'lpr-ascii'
Checking printer 'lpr'
Checking printer 'lp-raw'
'if' filter '/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp'
executable '/var/lib/apsfilter/bin/y2prn_lp.upp--raw-lp'
gubbio:~ #

 

 

     

 

top

Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb