Hack Week Two

Hack Week Two
Novell’s second ever Hack Week
February 11 – 15

I didn’t get to participate in last year’s Hack Week because I was working in another part of the company at the time. This year I may get interrupted occasionally to help get Mono 1.9 out the door on time. In any case I may try to hack up an XRandR 1.2 preference management service for GNOME. I’d like my laptop to automagically switch to my desktop monitor when it’s plugged in, and ask me what I’d like to do if it doesn’t already know.

Update: Simon Holm Thøgersen wrote me to point out that Søren Sandmann is already well into this effort.

I had another idea for a virtual bluetooth keyboard (so that I could type at my N800 from my desktop) but that’s not as interesting now that I’ve got an N810. Maybe I’ll work on specs for a geo-location extension to XMPP instead? Aw nuts, that’s already in progress too!

Security Theater… again!

Nokia finally worked out their N810 developer discount code issues in the US which means I get to go through the LetsTalk security theater again! I thought I’d dig a little deeper as to what triggers them treating their customers like this. The representative grilling me said that they usually do verification on orders for unlocked phones. Conspiracy theories are left as an exercise for the reader.

But because I hassled them about it they went a step further on me and called American Express to ask them to call me and have me personally authorize the transaction. That call came through just as we finished with the following multiple-choice questions:

What month was Rebecca born in?
Which of these counties have you lived in?
What month was Bruce born in?

Why does this bug me so much? Because for $7.95 you too can find the answers to these questions and more! I used public record searches to find my high school classmates for our 10 year reunion. If you really want to steal someone’s identity $8 is a small price to pay to do decent job of it.

When American Express called me I had LetsTalk wait while I complained to AmEx and asked them to put a note in my record to not hassle me the next time LetsTalk asks them to. I also asked AmEx if there is some financial incentive for LetsTalk to do this, better rates for better security or something. There isn’t.

I really wish someone would slap LetsTalk for wasting their money and hassling their customers. Please, Nokia, please won’t you slap them? Or fire them. That would work too.

Comments are open on this post for anyone who can think of a legitimate reason for LetsTalk to do this crap.

Using a Wireless Router as an Access Point (Bridge)

Here at the Mono Summit we had not-so-great Internet access. One of the things we tried to remedy this was to plug in our own routers. This was itself an adventure as the network did not have any DHCP and wasn’t very friendly to us. We used etherape, wireshark, and a switch to figure out the settings on the not-so-reliable but very attractive Cisco Aironet 1130AG and put these settings on a Linksys WRT54G. Aaron Bockover got that hack working eventually. This alone wouldn’t improve the situation much so we added a couple more routers to the network. Ideally you would use a simple access point to do this so that everyone would be on the same subnet and have fewer NAT routers to go through.

Real APs are hard to come by these days but you can use a wireless router as an AP by plugging in one of it’s LAN (not WAN) ports into a LAN port of your router. There are a few more things you must do for this to work properly:

  • Plug one of the APs LAN (not WAN) ports into a LAN port on the router (may require a crossover cable)
  • Disable the DHCP server on the AP
  • Change the internal IP address of the AP to something different than the router (but on the same subnet)

Without these you will have conflicts that will prevent anyone from getting out to the Internet. If you were at the conference and wondered why we didn’t have Internet most of Thursday (and some of Wednesday) this is why.

In theory it should be possible to use the same SSID for each of the routers and clients will roam between them but we didn’t want to push our luck. Also I don’t know if roaming would distribute the load evenly whereas we hoped that folks would choose an AP more or less randomly. This is not the same thing as WDS.

XPInstall for Plugins

One of my first assignments on the Moonlight team was to create an installer for Firefox so that users would be able to click on a single link and have the plugin installed and working without having to restart the browser. Thanks to reasonably good documentation on Mozilla’s site the installer is done.

XPInstall actually provides you with two ways of installing add-ons (extensions, plugins, themes, etc.). The newer method uses an Install Manifest to describe the add-on. The older method uses an install script. We’d love to use the newer method but unfortunately it requires that the user restart the browser.

At first I got a lot of reports that, even using the older install method, people had to restart their browsers to get the plugin working, or at least open about:plugins. Turns out there’s a JavaScript method, refreshPlugins, to reload the plugins, and optionally to reload open pages (to load the content the plugin is supposed to handle).

The current status is that the installer works well for both the Silverlight 1.0 and 1.1 profiles (without and with a CLR). Another cool thing to mention is that the current 64-bit 1.1 installer is under 7MB (compressed) without any real work on optimizing for size.

Bluetooth in openSUSE 10.3

There’s some great new bluetooth stuff available now for Linux but it didn’t quite make it into openSUSE 10.3. Most important to me is the ability to add a bluetooth mouse from a GUI and have it work every time you turn it on. GUI for using bluetooth audio devices is coming soon.

bluetooth-preferences.pngadd-device.pngauthorization.png

To get this stuff into openSUSE you’ll want to:

Add the GNOME:Community repository and install / upgrade bluez-gnome and bluez-utils.

Enable bluetooth using the YaST Bluetooth tool or by setting START_SERVICES="yes" and running SuSEconfig.

Have a look at /etc/bluetooth/hcid.conf and make sure it doesn’t have much more than this:

options { security user; }

Some of the other stuff that gets put in there by default can get in your way. It’s safe to just delete the other stuff. In fact it’s probably safe to remove this section as well.

Then log out and back in again or reboot or start the bluetooth services and run bluetooth-preferences.

Favorite GNOME Bug

Now that XRandR 1.2 is working so well I change resolutions a lot (between my laptop display and the larger one sitting on my desk) which brings an old favorite GNOME bug to the forefront for me: Applets on the right of a panel change positions and order when display resolution is changed.

There are a number of related bugs already in bugzilla and one can see from other bug reports that a number of GNOME developers have thought about this problem and wanted to solve it.

My personal take on this is that the panel should not touch the position or right_stick settings of an applet at all but should only try it’s best to interpret them in a sane way. It seems to be changing the positions when the size of the panel changes, probably trying to do the right thing.

The possibility of treating the gnome-panel more like Firefox treats it’s tool bars, with all positions being relative and fixed and variable width spacers, is also reasonable. In the mean time I’ve written a script that resets the broken positions and reloads the panel. This reveals bugs in applications that don’t handle a reloaded notification area (including network-manager-gnome) but I can just restart those as well.

AMD64 CPU Flag

Wade just asked me about this and it took me a while to find so I’m posting it here for posterity: The CPU flag that tells you if your processor is 64-bit (aka EM64T) capable is lm. It stands for Long Mode, where 16-bit is Real Mode and 32-bit is Protected Mode. This is important because many manufacturers are shipping boxes as 32-bit even though they can do 64. Generally it’s because they have to ship a 32-bit version of Windows™ for better hardware support and they don’t want you to be upset about it.

In Linux you can see this by running cat /proc/cpuinfo and looking for lm under flags.