Monday, October 8, 2007

CUPS "hacking"

Just have a little trick I made up I thought I'd share.

I have an hp something-or-other printing that does both photos and paper. It installed nicely on the xubuntu box in our bedroom, but I have a mini running ubuntu with a nice big screen in the living room, and that's where we manage our photos. Its nice to have it in the living room because you can be all social and show off pictures and the like, but I got the mini and a flatpanel so I could keep the clutter in the living room to a minimum. So I have the photos in the living room and the printer in the bedroom.

So I was trying to share the printer using CUPS from xubuntu in the bedroom to ubuntu in the living room, but I was having a problem I wanted to be able to switch between using regular paper or photo paper from the living room, without going through the cups interface. (I like to make things nice and simple for my wife so she sees the advantage of linux over windows). As I was trying to get things set up I noticed that not all applications have the same printer interfaces. Some of them, like the gimp, have access to all the printer settings of the shared printer and you can choose the output from the print dialoge, but others don't have this built in, and even when it is built in, its a rather overwhelming dialoge. I wanted to be able to just pick print and hit go without having to worry about settings.

I did notice, however, that most of the print dialoges had a way to choose a default printer and that when I installed the printer in the bedroom, I was able to set default setting for it. So, while telling myself how smart I was, I added my printer twice to the server, once named "paper" with the paper tray as the default source, and once called "photo" with the photo tray as the default source. Then in my photo management application I set photo as the default printer and in openoffice, gedit, and firefox I set paper as the default printer. Now everything "just works". My wife can print documents, websites or photos without having to glance at any complicated printer dialoges.

Not that groundbreaking, I know, but hopefully someone will find it helpful.

No comments: