MS-Windows focus-follows-mouse Registry hacks

I like the "focus follows mouse" window-focussing model from X11, because

• I don't have to click on the window, just move the mouse and the window it's over is focussed
• I can focus a window without bringing it to the front, which is sometimes handy. If I want it in front, I can click it.

However MS-Windows follows the old-fashioned, Macintosh/Smalltalk style of having users click on a window to focus it for the keyboard. How do you make MS-Windows behave more like X11?

Registering local DTDs or XML schemas with NetBeans

The NetBeans online help describes the steps for registering a local DTD or XML file with NetBeans' DTDs and XML Schemas Manager. It's succinct and to the point, but for the slow people in the room it's a bit confusing. So here's my tip for registering a local DTD file with NetBeans so that you can use NetBeans' awesome XML validation and completion features.

XMing screen size and changing multiple monitors

My work's notebook (Windows XP) is running Xming as it's X11 server, and it travels between work, home and on the train.

My work office has a docking station and a rotating second display. Typically if I start Xming with this display plugged in, Xming will adjust it's screen size to use both displays, but if I start it without the screen plugged in, it'll size to just the notebook screen. If I later add the 2nd screen (by docking the notebook), Xming won't use it without a restart. Also if I rotate the screen, only the top 1200 pixels will be used by Xming.

The solution is to specify a screen size to begin with that is as wide and tall as both of the screens. On my docked notebook the two displays are the notebook's display (1920x1200 pixels)  and 2nd display (1600x1200 pixels, which rotates to 1200x1600). So that means the combined screen width is 3520 pixels, and the tallest screen hight is 1600 pixels. Specify this to Xming when it starts:

path\to\xming.exe :0 -clipboard -multiwindow -screen 0 3520x1600

Now I can add/remove/rotate the second screen and still use all of it without restarting Xming.

Multiple Xming servers on a single Windows host

One use-case we have at work for Xming is to be the X11 server on a Windows RDP terminal server. For security reasons (don't ask!) we can only access certain Unix hosts via an RDP session from our desktops, not directly over the campus LAN. So, we installed Xming on the TS and it works well. Except if two or more people wish to use it at once. Then it's first come, first served.

Trouble with the New X11 server in Cygwin

I recently upgraded my Cygwin install and noticed that Cygwin has switched it's X server XWin.exe from the XFree86 codebase to the Xorg codebase. Besides an updated logo, it also has some other side-effects.

NetBeans 6.5 and Python

NetBeans 6.5 is out! You can run it with the Nimbus look and feel too! There's also an Early Access plugin for Python. All very nice.

I recently had occasion to play with some Python at work (a small script to do some configurations, and I didn't want to do them in bash), so I took the time to get all of this set up. It's all so very easy and not worth writing about. However I thought that the interactive debugger (which is awesome, btw) has a small issue that needs resolving. Mean-time, here's a work-around.

Switching to Java JDK 6u10

I've been using 6u10 beta for a while and keeping 6u3 as my main JDK. It's also the default JDK for NetBeans but now that update 10 of Mustang is out of beta, it's time for me to ditch 6u3 and swtich to 6u10 final.

Stripping tags from ogg Vorbis files

I have a bunch of free Ogg Vorbis audio files that I've downloaded from Kahvi.org. They're great! But recently they've been including cover art within the files, which breaks Windows Media Player (it can't handle the very long tags of binhex-coded JPGs).

Since I rather like WMP's integration in windows (keyboard shortcuts), and Amarok isn't quite ready for win32, I thought I'd find a way to strip the troublesome tags from the data files rather than change to another player.

Here's a quick-and-dirty shell hack to remove the tags from the files and get them playable by daft players such as Windows Media Player

Okay, this isn't rocket-science, and in fact it's not even my idea (heard it on the FLOSS POD about Git). A problem with centralised repository systems such as Subversion (which is used on SourceForge) is that you need network access to do many things, and also to just save your work. You can't do commits to the repo' while on the train, for instance (which is where I do most of my hacking).

One option is to switch to a distributed revision system, such as Git or Mercurial.  I may do that some day, but right now is not a good time for me to be learning a new revision system. Plus to have SourceForge host my project in Hg (for instance) means installing it myself and blah-blah-blah. Then there's IDE integration to consider...

I want to have my cake and eat it too.