GLabels Template

I purchased a HP Photosmart D5460 printer, and I wanted to be able to print on printable CD/DVDs in Linux. I created these GLabel templates for printing on both full size and mini media. There is also a template for Credit Card CDs.

These templates should work with any Photosmart printer equipped with the CD tray.

To use the templates, you can install the HP_CD_tray.template file in ~/.glabels for personal use or HP_CD_tray.template.xml file in /usr/share/glabels/templates for system use.

 


Envelope Printing Shell Scripts

I hate firing up a work processor just to address an envelope. A while ago, I can across a script to do it, but it didn't exit after one envelope. It would loop back to inputting the address after printing. I also thought the dialog code could you some cleanup. So I took it apart, made a couple of modifications, and built a new shell script from it. Later, I dressed things up a bit more, and here are the results. The scripts use slightly different ways to get the address to print.

The first script asks for the information one piece at a time, and then presents you with the finished product. You can then accept it, or specify what to edit.

The second script is a more compact version of the first one. It gets all the information in one dialog command. The drawback is that it does not let you specify what line to edit. (But you can just hit Enter to accept the values unchanged.)

The third script takes a different approach. It gives you a form to fill out, and then asks you if it should print the form. The drawback is that you have to use the arrow keys to navigate the form. If you hit Tab, it takes you to the menu at the bottom. If you hit Enter, it ends input and processes the form. (This is why I have the extra step before printing.)

The last script is designed to be used in X. It uses Xdialog instead of Dialog, and used the function that gets 3 lines of input at once to get most of the address. It uses a separate input box to get the zip code.

All the scripts retain what you have entered, so you don't have to start over if you make a mistake. The scripts exit after printing the envelope. The return address and the print command are set at the start of the script. They are also set to print an envelope that is centered in the printer, and feeds in the long way. This can be changed - it just happens to be what works for me.

The Envelope scripts

Possible changes.


Back to home page. HOME
Last Updated: 04/35/09
Mikkel L. Ellertson mikkel@Infinity-ltd.com
Copyright © 2005 Infinity Ltd.

Valid HTML 4.01 Transitional