"Linux Gazette...making Linux just a little more fun!"


Install New Icons in Caldera's Looking Glass Desktop

By


Looking Glass, or lg, is a pleasant GUI desktop included in Caldera's commercial Linux releases (not the lite versions.) However, its setup procedures and documentation can be very unpleasant. Deciphering how to add or change icons makes cracking the Enigma code machine look easy. If you enjoy puzzles and have plenty of time, read /usr/doc/html/Caldera_Info, specifically the Desktop User's Guide, Chapters 9 and 11. If you prefer some help, read on.

I wanted to place an icon on the lg desktop to launch Applixware, an office suite available from RedHat. To do this I had to create an icon with a paint program, import it into the lg icon gallery, edit the "source file for file type definitions," create a new "LG_rulebase file," and update the lg data directory. Makes a certain commercial desktop look pretty friendly, what?

Actually, it wasn't as bad as it sounds, and the new icon looks good and works well. This article will guide you through the process. Here is your very own free Applixware icon ready to install in lg; please don't complain about my artistry. You can use the same process to install any program's icon.

The first step is to create the icon. I tried to use the lg icon editor but found it crude and prone to crash. Xpaint works well and is probably already on your system; to be sure, execute the command

locate xpaint
I used Applix Graphics, in part to learn more about Applixware, with final touch-up in the lg icon editor. Whatever program you use, the resulting icon should be about 40x40 pixels, stored in either GIF or PPM format.

The next step is to import the icon. At the top of the lg desktop, click on Run, then Icon Editor. When the editor opens, click on Galleries, then System Icon Gallery. When the gallery window opens, click on Icon, then New. You will see an emphasized (black) area with a blank icon picture, probably labeled icon1. At the top of the gallery window, click on Icon, then Import. A file window opens. Navigate to where your GIF or PPM file is. Click on the file, then click on load in the file window. If the icon is just the right size, it will import directly into the emphasized area in the system gallery. If not, a window will appear that contains your icon. If part is cut off, drag on the lower right corner to enlarge the window and show your whole icon. (I'm assuming your icon ended up somewhat bigger that 40x40.) Click the radio button "Scale," then "Filter on Scale." This latter button smooths the image as you resize it. You should see a little box at the upper left of your icon picture. Drag the corners to cover your icon. Your final icon now appears in a smaller box at the upper right of the window. Click Apply; the gallery window puts your icon into the blank icon picture and changes the name to that of your icon file.

To give the icon the right name, click on Icon in the gallery window, then Rename. In the New Name box, type APPLIX_PRG and click on OK. If you want to do some final "fat bits" touch-up, click Icon, Edit, and have at it. I suggest that you save your work frequently, because the editor crashed on me. Don't bother editing the mask. It gives a 3D appearance to a selected icon, and the default mask is good enough. When done with the editor, click File, Close, and your final icon appears in the gallery. In the gallery window, click File, Close, and say yes to save your work. One last warning. Even though the icon editor lets you export the completed icon for other purposes, this feature seemed broken. All graphics programs I tried complained that the exported icon file was unreadable.  (Did I mention that the lg editor seems to have problems?)

Now you have to tell lg how to use the icon. Change directory to /usr/visix/lg/default/lg_ftc. Open prog.loc.ftc in your favorite editor. This source file defines local file types and their associated icons. Insert the following text at the beginning, after the two "include" lines:

DEFINE TYPE Applix
ICON APPLIX_PRG
FILE_DESCRIPTION "Applix desktop suite program"
BINARY_EXECUTABLE
AND NAME "applix"
INHERIT_COMMANDS BinExNativeClass
END
No, I don't know what it all means. I adapted it from other program entries. But, hey, it works, and most of it is obvious. If your icon is for a different program, edit accordingly. Save the file. At the command line in the same directory, type make all and make install. Quit and restart the lg desktop.

We're almost done. In the lg window click on Windows, then Open Directory. Navigate to opt/applix (or wherever applix is stored) and you should see your beautiful icon designating your program. Drag the icon out of the directory window and onto the desktop window. Park it in an aesthetically pleasing place. Launch your program by doubleclicking your new icon. Congratulations. Doesn't this make you want to read the rest of the lg documentation? Actually, you might want to learn about file associations and other wonders of lg. Then you can write an article for lg (that's Linux Gazette here) telling the rest of us how you did it.


Copyright © 1998, David Nelson
Published in Issue 30 of Linux Gazette, July 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next