[comp.windows.open-look] olwm and Xt/Xaw based applications

darci@protocol.COM (Warrior of the Heart) (05/08/91)

I routinely compile many of the contributions from comp.sources.x but with
many applications, I have trouble entering data. For example, with dclock
the man page says I should be able to change the attributes of the clock
by typing various characters. All I get is a beep from olwm! The same
with xrlogin: when I try to enter the "remote user name", beep-beep-beep
and no characters appear.

Anyone else have this problem? Is there a known solution?

Thanks in advance!


-- 
Oh, life is bigger, it's bigger than you                   darci@protocol.com
    and you are not me...                             ...uunet!protocol!darci
I think I thought I saw you try                    ...nosun!protocol.xom!darci
    Oh, no, that was just a dream   -rem                   darci@techbook.com

nazgul@alphalpha.com (Kee Hinckley) (05/08/91)

In article <1991May7.221551.29277@protocol.com> darci@protocol.COM (Warrior of the Heart) writes:
>I routinely compile many of the contributions from comp.sources.x but with
>many applications, I have trouble entering data. For example, with dclock

Set the olwm resource "focusLenience" to true (see the olwm man page
to make sure I've got the spelling right).
-- 
Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

erc@pai.UUCP (Eric F. Johnson) (05/10/91)

Warrior of the Heart (is this your real name?) (darci@protocol.COM) writes:

>I routinely compile many of the contributions from comp.sources.x but with
>many applications, I have trouble entering data. For example, with dclock
>the man page says I should be able to change the attributes of the clock
>by typing various characters. All I get is a beep from olwm! The same
>with xrlogin: when I try to enter the "remote user name", beep-beep-beep
>and no characters appear.

>Anyone else have this problem? Is there a known solution?

Yes. I was first bitten by this when I loaded in a beta version of Sun's
OpenWindows 1.0 (the version with the chomping mouth for a trash can).

The problem is generally simple. The rules for well-behaved X applications
(the ICCCM) state that if an application program wants keyboard input, it has 
to explicitly tell the window manager this fact, or the window manager (in
the case olwm) may deny keyboard input for the application.

Your applications were probably written before these new rules were
widely distributed or the authors just didn't realize what is now
necessary (the ICCCM rules _have_ changed over time). It's easy to
start laying blame, but I'd rather just make the problem go away.

To solve the problem, try this:

You need to create a resource file for the application(s) in question, or
use a generic resource file called .Xdefaults (in your home directory).
Chances are you already have an .Xdefaults file, so edit that. Then, you
need to set the "input" resource to "True" for the application(s). For
the xterm application, for example, you would add the following line:

xterm*input:      True

(I don't use dclock or xrlogin, but I would guess you would need to add
the lines below.)

dclock*input:      True
xrlogin*input:     True

You can also try to tell olwm to be a bit more lenient toward these
applications, with this line in your .Xdefaults file:

OpenWindows.FocusLenience:     true

After all this, you should restart all the applications, including olwm
(it may be easiest for you to log out and then log back in).

We did a column on this very problem in the March, 1991 issue of UNIX Review
(look up the CrossThoughts column). The February, 1991 column was on
resources and resource files, which may help if you are unfamiliar with
editing X resource files.

I hope this helps,
-Eric


-- 
Eric F. Johnson               phone: +1 612 894 0313    BTI: Industrial
Boulware Technologies, Inc.   fax:   +1 612 894 0316    automation systems
415 W. Travelers Trail        email: erc@pai.mn.org     and services
Burnsville, MN 55337 USA