Cups Printing

RTFM

http://www.cups.org/doc-1.1/sam.html

Check Settings

gs -h | grep cups should reveal the ghostscript cups device.

CUPS Backends

The last part of any CUPS filtering chain is a backend. Backends are special programs that send the print-ready file to the final device.

AppSocket/HP JetDirect

This backend sends print files to AppSocket (a.k.a., HP JetDirect) connected network printers. An example for the CUPS device-URI to use is socket://10.11.12.13:9100.

smb

This backend sends print files to printers shared by a Windows host. Examples of CUPS device-URIs that may be used includes:

smb://workgroup/server/printersharename
smb://server/printersharename
smb://username:password@workgroup/server/printersharename
smb://username:password@server/printersharename

The smb:// backend is a symlink to the Samba utility smbspool (does not ship with CUPS). If the symlink is not present in your CUPS backend directory, have your root user create it: ln -s `which smbspool’ /usr/lib/cups/backend/smb.

To list all available backends installed on the system, use lpinfo -v

Troubleshooting

Supply also config files like /etc/cups/printers.conf, /etc/cups/cupsd.conf, /etc/cups/ppd/*.ppd, /etc/samba/smb.conf, …

Strip away the comments and blank lines in the config files when posting them, for example with a command like cat /etc/cups/cupsd.conf|grep -v ^#|grep [:alnum:] > cupsd.conf-stripped

Check the integrity of manufacturer-supplied PostScript PPD files with the cupstestppd utility. Often the output helps you fixing small flaws by editing the PPD file. CUPS only accept PPD files which pass the test. Unfortunately often printer manufacturers do not comply well with Adobe’s standards.

Send print jobs with CUPS in debug mode. Edit /etc/cups/cupsd.conf switching the “LogLevel” to “debug”. Kick the CUPS daemon with killall -HUP cupsd and send a print job. Then have a look into /var/log/cups/error_log and look for error messages, GhostScript command lines, option settings. Post relevant parts of the file if you didn’t find a solution for your problem.

Create your own raster driver

http://www.cups.org/documentation.php/raster-driver.html

Xerox 7345

joem-xerox7345.drv

jm7345.ppd

cups-overview.pdf

Try the ljet4 driver from http://www.linuxprinting.org/show_printer.cgi?recnum=Xerox-WorkCentre_7345

Linux Convert .m4a to .mp3

A handy bash script for converting all m4a (iTunes) files in the current directory to mp3.

#!/bin/bash

for i in *.m4a; do
echo “Converting $i to wav…”
wavname=”$i.wav”
faad -o $wavname $i
echo “Converting $wavname to mp3…”
mp3name=”$i.mp3″
lame -h -b 192 $wavname $mp3name
echo “Cleaning up wav…”
rm $wavname
echo “Done. Output is $mp3name”
done

Paste the above into a file named m4a2mp3.sh and then chmod +x m4a2mp3.sh

cd into the directory containing your m4a files and then ./m41a2mp3.sh