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.

______________________

Webcast
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions