Technical article 105964

How do I bring focus to X Windows with my mouse pointer?

OpenServer 5.0.0OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

I want my X Windows to come to the foreground when I move my mouse pointer on them _without_ having to click my mouse buttons. How do I do this?

Solution

Instructions vary depending on which release of the operating system you have.

In SCO Open Server Release 3.0 or earlier, this can be done readily with the ".Xdefaults" file:

1. From a non-GUI console screen log in as root.

2. In / create a file called .Xdefaults or if you wish this functionality to be user-specific, create this file in the user's home directory, for example:

/usr/rickda/.Xdefaults.

3. In this file insert the following lines of text:

Mwm*keyboardFocusPolicy: pointer
Mwm*focusAutoRaise: true

4. Now start the GUI by either typing "startx" at the # prompt OR switching to tty02 and logging in via scologin.

The windows should now "autoraise" when you move the mouse pointer to the window of your choice.

For SCO OpenServer Release 5.x do the following:

1. From a non-GUI console screen log in as root.

2. cd to /usr/lib/X11/app-defaults and vi the file called "Pmwm".

3. Find the line that reads "*keyboardFocusPolicy: explicit" and change "explicit" to "pointer". (Do not type the quotation marks.)

4. Save your changes by pressing the <Esc> key, and then typing ":wq!".

5. Now start the GUI by either doing "startx" at the # prompt or logging in via scologin.

See also

For additional tricks and tips on modifying the GUI see the "SCO OpenServer Graphical Environment Reference" documentation.

From the Xinuos technical article database, record 105964. Reproduced with permission. The original is at www.sco.com/ta/105964, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.