old-www/LDP/LG/issue30/nelson.html

135 lines
6.9 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Install New Icons in Caldera's Looking Glass Desktop LG #30</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.04C-Caldera [en] (X11; I; Linux 2.0.29 i586) [Netscape]">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H1><font color="maroon">Install New Icons in Caldera's Looking Glass Desktop</font></H1>
<H4>By <A HREF="mailto:nelson@er.doe.gov">David Nelson</A></H4>
</center>
<P> <HR> <P>
Looking Glass, or <TT>lg</TT>, 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 <TT>/usr/doc/html/Caldera_Info</TT>,
specifically the Desktop User's Guide, Chapters 9 and 11. If you prefer
some help, read on.
<P>I wanted to place an icon on the <TT>lg</TT> 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 <TT>lg</TT> icon gallery, edit
the "source file for file type definitions," create a new "LG_rulebase
file," and update the <TT>lg</TT> data directory. Makes a certain commercial
desktop look pretty friendly, what?
<P>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 <A HREF="./gx/nelson/applix.gif">icon</A> ready to install
in <TT>lg;</TT> please don't complain about my artistry. You can use the
same process to install any program's icon.
<P>The first step is to create the icon. I tried to use the <TT>lg</TT>
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
<PRE>locate xpaint</PRE>
I used Applix Graphics, in part to learn more about Applixware, with final
touch-up in the <TT>lg</TT> icon editor. Whatever program you use, the
resulting icon should be about 40x40 pixels, stored in either GIF or PPM
format.
<P>The next step is to import the icon. At the top of the <TT>lg</TT> 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.
<P>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.&nbsp; (Did I mention that the
<TT>lg</TT> editor seems to have problems?)
<P>Now you have to tell <TT>lg</TT> how to use the icon. Change directory
to <TT>/usr/visix/lg/default/lg_ftc</TT>. Open <TT>prog.loc.ftc</TT> 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:
<PRE>DEFINE TYPE Applix
ICON APPLIX_PRG
FILE_DESCRIPTION "Applix desktop suite program"
BINARY_EXECUTABLE
AND NAME "applix"
INHERIT_COMMANDS BinExNativeClass
END</PRE>
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<TT> make all </TT>and<TT> make install</TT>. Quit and restart
the <TT>lg</TT> desktop.
<P>We're almost done. In the <TT>lg</TT> window click on Windows, then
Open Directory. Navigate to <TT>opt/applix</TT> (or wherever <TT>applix</TT>
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 <TT>lg</TT> documentation? Actually, you might want to learn
about file associations and other wonders of <TT>lg.</TT> Then you can
write an article for lg (that's Linux Gazette here) telling the rest of
us how you did it.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1998, David Nelson <BR>
Published in Issue 30 of <i>Linux Gazette</i>, July 1998</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./mueller.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./pagey.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->