Tips and hints

From time to time programmers hit problems which require hunting through documentation or searches for examples, a common scenario for me.  This page will summarise my attempts to solve such problems.  If they are not always the best solutions, at least they work, for me.  It will be a bit of a ragbag but should get organised as it builds up.
 

Something I have been thinking about lately is animation. There is Java of course but I have not got round to investigating that. Animated GIFs are easy enough to display in Netscape; all these are is a pile of still frames displayed at a predetermined rate. Netscape handles these automatically if they are included in a page with the IMG SRC tag, like so:

Asteroid flybys:<img src="mfb.gif" alt="Mathilde">
The viewing cycle will start automatically and continue to run. Offline, such images may be viewed frame by frame using the display command from the ImageMagick suite.

With videos the situation is not so clear cut. A viewer such as the shareware mpegTV can be installed as a Netscape helper application but not as a plugin. The X interface mtv allows direct viewing of MPEG1 files, with audio. My first attempt to use it via Netscape started with modifying the preferences file via the edit/preferences/Navigator/applications menu. The default "Unknown:Prompt User" does not seem to do anything at all. When that string is replaced by the path "/usr/X11R6/bin/mtv %s" and a URL specified as follows:

Asteroid flybys:<a href="/home/web/local/astro/erosflyby.mpg"> Eros flyby movie</a>
or words to that effect, things start to move.
 

The other day, under Gnome, something happened to my Emacs setup and I lost the ability to specify the startup window size.  I could not understand why the emacs resource definitions in .Xdefaults were being ignored, nor why specifying a size via the -geometry WxH attribute did not work from the command line.  In the end, after poking around the system, I discovered a solution.  If you right click on the title bar of the emacs window you will get a menu containing the entry "remember state" which provides the option of remembering the current state, either everything, or one of size, position, colours, etc.
 

XF86_I128.
Up to and including RedHat 6.0 the Number Nine Imagine I128-2 X server worked perfectly, but under
RedHat 6.1 it appears to be badly broken and there is no information about the problem in the RedHat support pages.  My solution was to install 6.1 and copy the 6.0 version of XF86_I128 to /usr/X11R6/bin and the old XF86Config file to /etc/X11.  It might be necessary to crash out of xconfigurator during the install; this does no harm apart from forcing a check on all the disk partitions at reboot time.