Motif 1.2.3 Runtime and Development System for Linux

The Motif toolkit has come to Linux. Dale reviews Sequioa International's Motif Toolkit for Linux.
Installation

Sequoia has done a great job with their installation instructions. They make it very clear what to do. Motif comes on three 3.5" diskettes. You first install copy these into /tmp using cpio and then you run an installation script. One small complaint I have is that cpio tells you to load a ”tape“, which could confuse some people, but that is cpio's problem and certainly not Sequoia's or Motif's. The installation script verifies that you have X386 installed and won't continue without it. This is nice.

I was done installing in about 10 minutes. The script made all the necessary links and put all the executables and libraries into the right spots. I literally had nothing more to set up or do to run or develop motif programs.

Firing up MWM

I had a ”start MWM“ option on my “fvwm” root menu, so I tried it. Bingo; just like that I was running mwm! To make mwm my default window manager I just had to edit my .xinitrc and replace the last fvwm in the last line with mwm.

The documentation did not describe this, though anyone who is advanced enough to want to use Motif would likely be able to figure it out. This is a minor instance where the product could be improved.

The main area that more instructions are needed is in the customization of the window manager. I had a whale of a time configuring mwm. I thought that all I'd need to do is copy the sample mwmrc file they provide into ~/.mwmrc, make a few changes and I'd be off. Well, an hour later I finally figured it out (after signing onto a friend's machine to check out his .mwmrc).

It turns out that for your own window manager menus to be activated, you must have a set of “Button Bindings” named “DefaultButtonBindings” to tie the buttons to the menus. Now the example mwmrc file does not have a set button bindings named “DefaultButtonBindings” anywhere. Instead, it has “MyExplicitButtonBindings”. So no matter what I did I wasn't picking up my own menu buttons. Finally I read through the manual enough to finally understand, changed the “ExplicitButtonBindings” to “DefaultButtonBindings” and I was in business. This is not a fault of the Linux product, but more generally with the Motif documentation. Most often, users just copy an .mwmrc from someone else they know. However, for Linux people who are often working in isolated environments, it might be a nice touch to supply a more ready-to-go sample .mwmrc or better documentation on setting one up.

The other common thing you may want to change is the keyboard focus policy. This determines how you choose the window into which you will type. I prefer “focus follows mouse”, which means that all I need to do is put the pointer into a window and I can start typing. The default Motif behaviour is to have “click to focus” where a window keeps focus until you click in another window. You can also set whether or not you want the window with focus to be raised automatically to the top of the stack. The two X resources you alter in your .Xdefaults file are:

Mwm*keyboardFocusPolicy: pointer
Mwm*focusAutoRaise: false

This is the type of behaviour I prefer, which is the focus follows the mouse and it does not automatically raise the window with focus. If you prefer the Microsoft windows behaviour, choose the opposite settings (“explicit” for keyboardFocusPolicy and “true” for focusAutoRaise) in your .Xdefaults file, type:

xrdb < .Xdefaults

to update the settings, and finally restart mwm to apply the changes.

What is Included?

The Sequoia Motif comes with UIL (the user interface language of Motif), static and shared Motif libraries, the full set of on-line Motif manual pages, a number of demo programs with source code, and the OSF/Motif user's guide.

If you want to distribute Motif programs, you need to link statically by changing the definitions of the Motif libraries in a makefile to include the static (.a) libraries. You are not allowed to distribute the shared Motif libraries. This makes executables a lot bigger; for a program I wrote, the executable was 130KB when the shared libraries were used and 1.2MB when linked statically. If you are going to be running a lot of Motif programs, it is better to have the shared libraries around and have executables not linked statically. It is possible to distribute executables linked with the shared Motif libraries, but then only people with copies of the shared Motif libraries will be able to run your binary.

The demo programs all make without a hitch on my 8MB system. I believe that development can be done with 8MB, but of course if you have more memory, things will work much faster, since there will be much less swapping.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix