3

I have Xorg with Twm and xterm installed on Arch linux, and when I start the X server, I can type in xterm only when the mouse pointer is over its window. I have been searching options to Xorg and Twm which can have something related with focus when mouse is over window but I didn't succeed.

How can I set my system up so that focus isn't bound to the mouse position?

1 Answer 1

3

What you see is the normal way of twm to handle the mouse focus.
The method is called focus follows mouse.

Since 1989, twm was the default window manager of the X Window System. That means that it is a reference implementation, like other default components of X.

Most reference implementations of other X components had incremental changes since that time, and are still in use.

The window manager twm is different; It did not evolve and stay in widespread use. Because the topic of window management got a lot of progress, it has been replaced by other solutions which applied new ideas and methods. That is why it looks pretty old now - it has been long out of practial use.


So it's basically old in relation to the ongoing developments in user interfaces.

At the time twm was most used, focus follows mouse was verry common. I remember I used it myself.
From the documentation, twm does not seem to have alternative modes. It may be possible to create a custom .twmrc implementing such a mode, but I do not assume such a .twmrc is available.

Practically, if you want a different focus mode, you need to change the window manager.
Is there anything that makes you locked to twm?


In case you can use a different window manager, there is one that has been started from the source code of twm, and got lots of features suporting many configuration styles to support usability, called FVWM. It is "old" too, but less so. Like twm without the minimalism.

A more modern window manager would be metacity. There are also compositors, like compiz, which solve the same problem of managing windows, but are much more complex - they make all programms draw their output in some hidden place, and can fully maniplulate that output, before showing it to the user.


(There is an interesting variant of focus follows mouse: sloppy focus. That mode allows the mouse pointer to leave a window for a short time, before the focus is changed to the window under the pointer. (Try it if it's available in similar window managers.))

3
  • I've just started serious adventure with linux and have decided to chose Arch because I want to have everything under control and have awareness about every package/program installed. Twm is basic window manager so I chose it. I didn't look out for other WM because I thought I can customize everything. Which one do you recommend? Mar 26, 2015 at 21:34
  • One of the next steps in the evolution of window managers is fvwm - it's a plain, classic window manager just like twm, but much more configurable, has multiple focus modes to choose, etc. It is "old" too, but not that old. A modern window manager would be metacity. There are also compositors, like compiz, which solve the same problem of managing windows, but are much more complex - they make all programms draw their output in some hidden place, and can fully maniplulate that output, before showing it to the user. Mar 26, 2015 at 21:45
  • @user2551229 I updated the answer regarding alternatives. I believe the one proposed in the answer is what you are looking for. But if you want a modern compositor, compiz can provide maximal configurability. Mar 27, 2015 at 4:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .