Much ado about scripting, Linux & Eclipse: card subject to change

2007-05-28

The P is for Painful

Turns out I'm not the only person having hardware woes with my Thinkpad T60p. Here's a recap of the day I've had with my beloved/behated lappy:

The day begins by waking up the T60p from its slumber in its port rep at home. Checked mail, read some bug reports, then put it to sleep (suspend to RAM) for its commute to work with me.

Unfortunately, I'd been using the lappy's wifi last night and left the wifi radio killswitch turned off (ie., wireless was enabled), so the system never fully went to sleep (battery light and crescent moon light were both on when I arrived at work); with wifi disabled by kill switch, I can usually sleep/resume w/o incident.

At the suggestion of a fellow *ubuntu geek, Marcelo, I tried the magical incantation, ALT-PrtSC, S, U, B to Synch, Unmount, then reBoot the drive, but it didn't work. So, 4 seconds of power button and a quick reference to Mortal Kombat were required to, ahem, "Finish him."

fsck ran clean and rebooted automatically, but wouldn't actually start, so I had to 4-second-power-button ("4SPB") it again. This time it came up fine, no data loss noted.

Later, I unplugged my power supply to lend to Marcelo, and my USB mouse stopped working. I moved it to the USB port in the T60p (instead of the port rep's USB ports), and it worked (I've seen this before when I close the lid or the system goes to sleep -- the USB ports in the port rep just stop working until I reboot). Then I noticed the PS/2 keyboard was dead. I unplugged and replugged, but still dead. I popped the T60 out of the port rep, and it froze up. Good times. Tried the magical incantation again: no dice. 4SPB killed it, fsck was clean (though there were a lot of things to fix automatically), and again, automatic reboot dumped into a black screen of nothingness (perhaps it was asking for a fingerprint swipe on an inactive screen?). 4SPB a second time, and it booted fine.

Now, after two fsck disk checks and 4 reboots today, my USB mouse works but the PS/2 keyboard does not. I suspect this is because the port rep is not currently plugged in. Why a serial device needs external power is beyond me, but after this I'm returning the port rep for a PS/2-to-USB adapter because these headaches aren't worth the productivity losses.

At least the hangs today haven't resulting in my having to recover my ~/.gaim and ~/.skype folders (which strangely, happens nearly every time I crash and have to fsck manually to recover the drive, because apparently these programs share the same chunk of the drive for their config files).

2007-05-15

Lotus Notes: A Retrospective

Did a quick, narcissistic self-google tonight and discovered that a number of people have been talking about my Notes 7 installer script.

This got me thinking about Notes through the ages, from the bad old days of 4.x when I first started w/ IBM in '99 and longed for Groupwise or PINE to my days of writing LotusScript and designing database apps (while trying not to curse at Designer for its frequent, and at the very least, predictable crashes) in and around the 5.5-6.0 days, to the days when I first tried to install some flavour of Notes on a linux box.

Notes 6.0 and 6.5 thru WINE were horrible, and painful to set up -- I can't recall if I ever managed to get them working, but I do remember wondering how IBM could invest so much time and money in Linux without making Notes run there.

Notes 7.0b3 with WINE (still with the 6.5 splash screen) was buggy to the point where right-clicking your inbox caused the RSOD (Red Screen Of Death), but was at least a little easier to install, in that I could actually do it on a Debian-based system. Unfortunately, it was pretty temperamental and if you accidentlally upgraded your WINE from a very special patched version available only on internal IBM servers, you broke it. It also came with the unfortunate acronym "NUL", for Notes Under Linux. I'll let you make your own jokes.

Notes 7.0 was certainly an improvement over the past versions, but being a full Eclipse-based Java client, there's a certain amount of memory usage that's unavoidable. That said, there's no more Windows emulation through WINE, so it's more stable. I can now run Notes 7 without random crashes and hangups on Linux (though I do still get some pretty odd error messages thrown at me once in a while -- it just wouldn't be Notes without 'em!). Yes, I'm often annoyed by the fact that modal dialog boxes appear UNDER my main Notes window and sometimes don't appear until I minimize everything. True, my laptop is a T60p w/ 2G or RAM and a dual-core 2.0G processor, so it's got horsepower to burn, but the point is, from a usability standpoint, Notes 7 actually works on Linux. Combine it with a couple Eclipse workspaces and Sametime 7.5.1 and you *do* chew up a lot of RAM, but then, that's why you're running Linux, right? Try doing that on Windows and still getting reasonable performance when your virus scan software starts up. ;-) Of course I still prefer Gmail, but I digress.

It's my fond hope that the folks that package Notes will heed the rants about how much of a pain it is to install on anything but Windows, RHEL and SuSE, and make the experience easier for everyone else, like us SimplyMEPIS / (k)ubuntu folks. Clearly, things have improved substantially. That said, there's still a long way to go before Notes can be installed via apt-get without having to worry about missing fonts, libraries, PATH entries, or which of the several included startup scripts to use to launch Notes.

Notes 8 is now available in beta, and according to fellow IBMer-blogger Chris Aniszczyk, Notes 8 will be even better still. When I go through the process of installing that one, I'll provide a new script or at least blog the experience. Stay tuned.

2007-05-13

Eclipse.org: safe

Found the McAfee SiteAdvisor site by accident tonight, and decided to see what it had to say about eclipse.org. Good news, we're safe, send out low email traffic, and have no recorded annoyances. Bad news, they only found 216 downloadable files. I don't think they're trying hard enough. ;-)

2007-05-12

Synergy - multiple computers, one shared keyboard

At the suggestion of my summer co-op student & fellow linux evangelist, Neil Skrypuch, I've installed Synergy and can now control my three systems (desktop + two laptops) from a single keyboard. The most amusing part of this is that I can wrest control of my other half's mouse when she's playing cards to mess up her game.

In all seriousness, this is a very cool app which effectively eliminates my need for a KVM box, and also provides more function than a KVM, since not only can I now control multiple desktops from one place, I can also pass data between them. The best use of this so far is that I can select a URL on one machine and open it with another, as Synergy creates a shared clipboard all desktops can use. Very cool.

Here's how I have it set up:

  1. Server: Thinkpad w/ external monitor, keyboard, mouse. Located on left side of desk, with monitor in center of desk.
  2. Client #1: Desktop w/ backup keyboard/mouse (out of the way and rarely used). Located on right side of desk
  3. Client #2: SWMNBN's Thinkpad (for entertainment purposes only). Located on her desk, right of mine.

All I had to do was create an /etc/synergy.conf:

section: screens
  nickblappy:
  nickbdesk:
  TPAD:
end
section: links
  nickblappy:
    right = nickbdesk
  nickbdesk:
    left  = nickblappy
    right = TPAD
  TPAD:
    left = nickbdesk
end
section: options
  switchCorners = all
  switchCornerSize = 15
  switchDelay = 500
  screenSaverSync = false
  keystroke(alt+left) = switchInDirection(left)
  keystroke(shift+control+alt) = switchToScreen(nickblappy)
end

So, on startup of the Thinkpad (server), I run this alias:

alias SS='killall synergys; sleep 1; synergys'

And on the desktop:

alias SC='killall synergyc; sleep 1; synergyc 192.168.0.123'

As the second Thinkpad is running Windows, I just configure the client to auto-start on login and connect to the server's IP. To suppress warning messages when the server's powered down or travelling, I've set the Logging Level to Error instead of the default Warning.

That's it - it's crazy simple. You can also set linux clients/servers to run on startup, or to use SSH to encrypt data sent between machines.


Update:

To encrypt traffic with SSH, you need to do three things:

  1. Run OpenSSH on the server
  2. Run OpenSSH on the client, with local port forwarding. Here's a snippet of my ~/.ssh/config file:
    Host nickblappy
    Port 22
    Hostname 192.168.0.123
    
    Host localhost
    Port 22
    Hostname localhost
    LocalForward 24800 nickblappy:24800
  3. Change your alias to connect to localhost instead of the remote server:
    alias SC='killall synergyc; sleep 1; synergyc localhost'

    - or -

    alias SC='killall synergyc; sleep 2; screen ssh localhost "synergyc -f localhost"'

    (then CTRL-A,D to detach)

2007-05-11

Happiness in Codeslavery

Oh. My. God. It's over. Bug 106804, "rearrange the features to minimize external dependencies", is finally done. It's been quite the ride, as you can see in the bug. The last three days are a blur, but it's done. Marcelo and I have been fighting the good fight solidly from Tuesday until this morning to contain this change in time for the M7 + 1 deadline. Thanks to the PDE folks for providing invaluable assistance in deciding what paths to take. Pascal, Kim, Sonia, Andrew: you guys rock. Thanks also to everyone else I've bugged with 'have you ever done this with your features / does your project do this?' questions to determine if we were treading into impossible territory or following an existing path.

EMF now contains smaller features which can be installed via Update Manager to compose whatever legal combination you want. Thanks to Update Manager finally working with features' dependencies on plugins, you can use PDE to generate a feature's dependencies and have the Update Site actually work when you hit 'Select Required' to pick up all the associated required features and their contained plugins. (You have no idea how freakin' exciting this, and how long I've been waiting for this to work.) I still think features suck, but for now I'll allow that they suck a little less than last week.

So, here's the obligatory shout-out to the community to try out EMF 2.3.0M7, and let us know any issues you might have w/ migration & adoption. You can grab it from the usual places. Please don't hesitate to speak up in bug 106804: if there are any unforeseen migration pains, I'll use your comments to draft documentation explaining what's different, why, and how to roll with the changes next week after I've slept a little.

Thanks, everyone, and happy EMF'ing.

2007-05-04

Bad hash index. No cookie.

So I open up Notes 7 this afternoon and it tells me it wants to delete my old mail (because disc space is costly, after all). Gmail provides me 2.8G free storage, but IBM needs to purge my mail regularly to save space. Whatever. I decline its polite offer, but being a good Corporate Citizen, I decide to clean up my inbox myself, and get this lovely error message. I now have an inbox with deleted messages (marked with an 'x') I can't actually delete.

Maybe it's time to take zx's advice and step up to Notes 8 beta.

2007-05-03

Cracking NT passwords

Scenario: Desktop system that's been running linux for about a year, with an oft-ignored WinXP NTFS partition on it for those rare Windows-only tasks.

Problem: So oft-ignored, I've forgotten my XP login password.

Solution: A number of options exist, but I was looking for a simple 'boot into linux partition and then hack such-and-such file'. Didn't find anything like that (and my old'ish linux install doesn't have write-to-NTFS support anyway), so I decided to try a boot CD solution, trusting that if source is provided it's probably not some trojan exploit thingamabob. First one I tried was Peter Nordahl's Offline NT Password & Registry Editor, cd070409.zip, which worked like a charm.

Sidenote: I then updated XP using Windows Update and the machine ground to a halt for a few hours, ultimately having to be shut off because it wouldn't shut down properly. Several reboots later it's working again, but that's pretty much standard for Windows. Gah.

Survivor: Gazoo

Over two months have passed since I opened bug 175200, calling for a new Gazoo logo and icon for incubating projects. Many submissions have been considered. The final three need your votes to decide who will walk away with the title of Survivor: Gazoo.

With apologies to Mark Burnett (and none to Jeff Probst)...

It is: time to vote.