[ Bloke.com || Linux || JavaScript || Java || Volleyball || Link Me ]
Free: [ Guestbook || MessageBot || Plugins || Counter || AusPrices || Advertise ]
www.bloke.com

Home - Linux - Printer

LinuxPrinting.org

(sorry, this page is pretty disorganized)

I want to get a Epson Stylus C80 Printer. Today I went to Harvey Normal (on the Sunshine Coast) and they had the list price as A$699. I had prices from umart and other places pegging it at around A$585 (online only) or A$617 in the store (brisbane prices). I thought 699, was too much, but I told them about the prices, and they went to see what they could do. They came back with 650, and since I was going to Brisbane the next day, I axed the idea. I said I was thinking if it was 625, I'd just get it here, they said the absolute min was 635, and they'd be in trouble for that price. So you never know until you ask! (I did get the d-link modem for A$125, when the list was A$129. I had prices for A$117, but certainly couldn't be bothered for the difference. I didn't ask for discount, they just gave it.)

I decided on the C80 thanks to LinuxPrinting.org

If you are in the US, check out PriceWatch.com for good prices (enter epson C80 in the search window, printers should be should be around pages 2-3). Today, I see them for around US$157 (about A$300).

Okay, after going down to Brisbane, to see if anyone could get close to say A$625, I was disappointed. I didn't try very hard, but anyway on-line to www.wyntec.com.au. A$585 is the price, and looks like it'll be around A$20 postage. I fill out the no frills form asking for my printer, they email me back the same day: We have a deal! If you transfer funds into our account, we'll post it for free. Postage turned out to be A$16. Transfering funds to accounts is super easy in Australia compared to the US. The US banks have a lot of catching up (debit cards and EFTPOS are excellent services, and the US is only just starting to get into debit cards). So I transfer the money and the printer arrives 2 days later.

The Setup So I setup the printer, connecting the USB port to my second USB port on the laptop. Remember that the printer doesn't come with printer cables, so I steal the USB cable from my old modem, my laptop happens to be in windows so I install their software... There is a slight glitch, but since I didn't bother testing the printer yet, I thought I'd shoot for linux first.

Okay here we go... Looking around on the linuxprint.org site and linux-usb.org site, there is lots of mention of gimp-print and cups and ppd. CUPS (cups.org) stands for Common UNIX Printing System. PPD for Postscript Printer Definition, and gimp-print.

Trying to install RPM's
I tried to install the RPM's from rpmfind.net, but ran into dependency problems. As it turned out, it was all man page dependencies. You should check for yourself that there is nothing more serious for your system.

Now I check what is on my system:

bash-2.05% rpm -qa | grep print
printconf-0.3.44-1
printconf-gui-0.3.44-1
libgnomeprint15-0.29-6
gnome-print-0.29-6
bash-2.05% rpm -qa | grep cups
bash-2.05% 
My system has no gimp-print, and no cups rpms, so I check on my favourite Red Hat Mirror to see what packages they have (and check the updates as well). Hmm nothing.

Now over to rpmfind.net and type in gimp-print-cups and also cups (gimp-print-cups requires cups which requires cups-libs). There are no red hat 7.2 specific RPM's so I grab the RawHide1.0 for i386 of both. Cups (1.1.14-5) is around 4.1MB, cups-libs (1.1.14-5) is around 83k, and gimp-print-cups (4.2.0-1) is 10.7MB. Time for a nap (I only have a 56k modem).

It would probably be quicker to download the source and compile it from: www.cups.org/software.html, it's only 5.2MB.

Okay, I just accidently killed all mozillas (netscape), so to save the bytes that I just downloaded I use wget -c

wget -c ftp://ftp.rpmfind.net/linux/rawhide/1.0/i386/RedHat/RPMS/gimp-print-cups-4.2.0-1.i386.rpm
and
wget -c ftp://ftp.rpmfind.net/linux/rawhide/1.0/i386/RedHat/RPMS/cups-1.1.14-5.i386.rpm
and
wget -c ftp://rpmfind.net/linux/rawhide/1.0/i386/RedHat/RPMS/cups-libs-1.1.14-5.i386.rpm
Once the cups and cups-lib files are downloaded, I try to install with "rpm -ivh cups*rpm"
[root@tiger cameron]# rpm -ivh cups-libs-1.1.14-5.i386.rpm cups-1.1.14-5.i386.rpm
error: failed dependencies:
	libcrypto.so.3   is needed by cups-libs-1.1.14-5
	libpng.so.3   is needed by cups-libs-1.1.14-5
	libssl.so.3   is needed by cups-libs-1.1.14-5
	libcrypto.so.3   is needed by cups-1.1.14-5
	libpng.so.3   is needed by cups-1.1.14-5
	libssl.so.3   is needed by cups-1.1.14-5
By searching google and rpmfind.net, (and knowing that crypto/ssl is probably in openssl), I find the following two RPM's. Now when I try to install these RPM's, I get huge numbers of clashes for both libpng and libssl. Instead up upgrading (rpm -Ufh file.rpm), I go for install (rpm -ivh file.rpm). For my system I only get clashes with man pages. Warning --force is bad, you should convince yourself that you don't need the files that it says (ie run the commands without "--force" to see what conflicts (if any) there are.
[root@tiger cameron]# rpm -ivh --force libpng-1.2.1-2.i386.rpm
Preparing...                ########################################### [100%]
   1.libpng                 ########################################### [100%]
[root@tiger cameron]# rpm -ivh --force openssl-0.9.6c-2.i386.rpm
Preparing...                ########################################### [100%]
   1.openssl                ########################################### [100%]
[root@tiger cameron]# rpm -ivh --force cups-libs-1.1.14-5.i386.rpm cups-1.1.14-5.i386.rpm
Preparing...                ########################################### [100%]
   1.cups-libs              ########################################### [ 50%]
   2.cups                   ########################################### [100%]
Now with gimp-print-cups, I got a /usr/bin/escputil conflict from package gimp-1.2.1-7. So I kept a copy of this file:
[root@tiger cameron]# rpm -ivh gimp-print-cups-4.2.0-1.i386.rpm
Preparing...                ########################################### [100%]
file /usr/bin/escputil from install of gimp-print-cups-4.2.0-1 conflicts with file from package gimp-1.2.1-7
[root@tiger cameron]# cp /usr/bin/escputil /usr/bin/escputil.bak
[root@tiger cameron]# rpm -ivh --force gimp-print-cups-4.2.0-1.i386.rpm
Preparing...                ########################################### [100%]
   1.gimp-print-cups        ########################################### [100%]
[root@tiger cameron]# 
To look at the files that were installed by gimp-print-cups, I used
bash-2.05$ rpm -q --filesbypkg gimp-print-cups
All looks well.

I just found http://space.tin.it/computer/wvtberti/linux/stp_driver/gs_stp.htm#CUPS%20PRECOMPILED%20RPMs which says to reboot and connect to http://localhost:631/admin/, but a quick check of /etc/rc.d/init.d shows we can just do (as root)

[root@tiger /]# /etc/rc.d/init.d/cups start
Starting cupsd:                                            [  OK  ]
[root@tiger /]# 
The point your browser to: http://127.0.0.1:631/admin/ You might want to check your firewall settings (/etc/sysconfig/ipchains) to make sure that only localhost is allowed to connect to 631 (which is true by default for firewalled redhat 7.2 installs).

Now enter root and your root password.

How to print a text document

Just use lpr.cups. Basically
lpr.cups -P c80 file.txt
You can check the status with:
[root@tiger printer]# lpq.cups           
c80 is ready and printing
Rank    Owner   Job     File(s)                         Total Size
active  root    2       group                           1024 bytes
[root@tiger printer]# 
And use lprm.cups to remove jobs from the queue.

That page came out huge for me. I need to change the size: use -o lpi=xx -o cpi=yy , (lines/cols per inch - defaults are 10 and 6). I'll try 20 and 12.

lpr.cups -o lpi=12 -o cpi=20 -o columns=2 travel
It's small, but more like what I wanted.

How to print a pdf document

Basically the same as a text file.
lpr.cups -P c80 file.pdf
Todo: Find out how to make text in low quality mode, and text in high quality.

Notes: Output Mode: Black & White: Resoltion 360x180 DPI Draft is fast!

Output Mode: Colour Resoltion 2880 x 1440 DPI is butt slow...

How to print color graphics
I've just been using gimp, so I just start a version (I have so many it's not funny).

For me, I ran into two problems. This first was that the printer didn't appear as an option to select to print to. The second was that it didn't show the most recent version of "gimp-print" (it showed 4.0.5). The printer option problem went away, I suspect when I rebooted, but I'm not sure, and I'm unable to reproduce. The second ... well I'm still working on the second .. and the third is ... that it didn't work! todo...

Getting to print with lpr You need to configure /etc/printcap, and you need to have lpd running. Currently my /etc/printcap looks like this

c80:
Not to good cause lpr requires a bunch of other stuff. Long story short (as root): mkdir -p /usr/spool/LPD/c80 new /etc/printcap: (note that c80 should match the name that you gave in the add printer setup.
c80|lp|Cams Epson Stylus C80
	:sd=/usr/spool/LPD/c80
	:rw:lp=/dev/usb/lp0
now start lpd and look for errors, but the cool thing is that it sets all the file permissions up correctly. Notice in the above file I have |lp|, these are aliases, and lp means the default printer...
/etc/rc.d/init.d/lpd start
Now to test it:
lpr -P c80 /tmp/somefile.txt

Starting it on boot.

as root (and given that you have /etc/rc.d/init.d/cups)
chkconfig cups on
service cups start  
The second line starts it now :)

Todo: So actually, I didn't install gimp-print yet, so I got the source from http://gimp-print.sourceforge.net/, and followed the directions at from gimp-print-readme. Actually, I had run gimp a few times and the new gimp-print plugin didn't show ... this did the trick

./configure --with-cups --with-gimp --prefix=/usr
make
su root
make install 
exit
Although I did need to install cups-devel-1.1.14-0.i386.rpm which I found on this page (I should have got the one that matched my other stuff .. but anyway). I also needed to do
su 
cd /usr/lib
ln -s /usr/lib/libcups.so /usr/lib/libcups.so.2
/usr/lib/libcupsimage.so.2 /usr/lib/libcupsimage.so

After all that:

su
/etc/rc.d/init.d/cups restart
Now I delete the c80 printer I added with the web interface at http://localhost:631/printers/, and re-install (following my own instructions :-) ).

Printing color from the command line
I had lots of trouble printing from gimp (seems dumb I know), so I resorted to the command line:

lp.cups flamingtext.jpg
How easy is that!

In the end, I used something like this:

lp.cups -o ppi=150 -o landscape -o position=top-left -o media=A4 flamingtext.jpg
Note that the C80 doesn't actually have 600 dpi as an option, but when I made the image I needed an exact size, and I made it at 600 dpi (my mistake, I should have made it at 720dpi).

You can also use lpoptions to save repeated options. I saved media=A4 with

lpoptions -d c80 -o media=A4
You can see the current options using lpoptions with no options or:
[root@tiger root]# lpoptions -d c80
job-sheets=none,none media=A4
[root@tiger root]# 
The none,none are banner pages before and after the job. (valid values are none, classified, confidential, secret, standard, topsecret, and unclassified )

I did notice that the colour is way off. I'll let you know here if I come up with a good filter, but I actually don't tend to print too many pictures.

My Defaults

Links:

Last Change: Monday, 10-Jan-2005 07:41:39 EST

Disclaimer

The information provided within these pages is provided AS IS, and without any warranty. Following these directions may (but not limited to) crash your computer, delete all the information on your hard disk, open up security holes or cause your house to burn down. I made these pages to provide some information about the setup that I have done, but I did not proofread it for correctness, and in most cases did not test it. There are commands in these pages that would definately delete or corrupt all the data on your computer (especially the dualboot section). In fact it happened to me.... So you are on your own!


Cameron Gregory