Windows stealing your focus?

19 August 2008

I did some research into this, after being reminded of it as a problem that leads to sysadmin error. When you are typing into a window (such as an SSH session) you do not want a program such as Pidgin to take the input focus and wind up typing the root password into an IM box to a friend – and over the network in the clear besides!

This problem is not unique to Windows; it is just happens in more places in Windows. MacOS X and Gnome can suffer from this problem; KDE apparently is the has the least number of problems with this.

Apparently, there is a registry setting that will fix this (almost); it can be set by using TweakUI or by changing the value by hand with RegEdit. The key and value are:

HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout – set to 30d40 (hex)

Johan Känngård has a short article where he describes a program he wrote to set the proper setting every time he logs in – to foil programs that reset the setting.

There is a detailed explanation from Jeff Atwood at Coding Horror about the problems inherent in the focus-stealing approach, and how to fix it as a user – and also an article about the problems with XP’s automatic update nagging (a prime offender in focus-stealing).

There is also a nice article from Pro Reviewer about the problem. One suggestion sometimes made (and made well here) is to use a utility that keeps a window on top of all others: this utility will also, by extension, refuse to give up focus from the affected window. Pro Reviewer reviews DeskPins, which seems to work well. Just don’t expect any windows to come to the front…. like Outlook notifications or popups, etc.

Entry Filed under: Tips, Windows. Tags: , , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


David Douthitt

David is an experienced UNIX and Linux system administrator, a former Linux distribution maintainer, and author of two books ("Advanced Topics in System Administration" and "GNU Screen: A Comprehensive Manual"). View David Douthitt's profile on LinkedIn Support freedom The Internet Traffic Report monitors the flow of data around the world. It then displays a value between zero and 100. Higher values indicate faster and more reliable connections.

Recent Posts

Top Posts

RSS Sharky’s Column!

Calendar

August 2008
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Recent Comments

Anthony on About
MikeT on Stress Relief: Laugh Out Loud…
yungchin on Sparse files – what, why…
Randal L. Schwartz on Perl Tidbits: Annoyances and…
Court on Perl Tidbits: Annoyances and…

Category Cloud

BSD Career Conferences Debian Debugging Disaster recovery Fedora FreeBSD HP-UX Legal Linux MacOS X Mobile Computing Networking OpenBSD OpenSolaris OpenVMS Personal Notes Portable Code Presentations Productivity Programming Red Hat Scripting Security Solaris Storage Tips Ubuntu UNIX

Archives

Feeds

Blogroll

Pages

Meta