Monthly Archives: August 2008

Eclipse Subversive SVN+SSH and Putty Agent (pageant)

I’m using Subversive within Eclipse to provide SVN support. But since I’m now using SVN+SSH as connection mechanism to SVN, I wanted to use my SSH Key to do the authentication for me. It took me some time to find out (find with google ;) how I could get this to work. I ended up on another blog which contained a working explanation on how to get it to work.

You need to create an environment variable called “SVN_SSH” that points to an executable file that accepts the same command line arguments as ssh on unix. I did this by doing the following:-

  1. Set up ssh keys. Not going to cover that here as you can easily Google for that. You need to end up with your public key on the SVN server and your private key loaded into Paegent locally.
  2. Download and installed the excellent TortoiseSVN client for Windows.
  3. Set the following environment variable (by right-clicking on My Computer, Properties, Advanced, Environment Variables, New):-

    Variable name:
    SVN_SSH
    Variable value:
    C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe

    (The “\\” is very important, otherwise it won’t work. Equally, you cannot use the plink.exe that comes with putty as that fires up a command shell window which is really annoying. The TortoisePlink.exe is a windows implementation of plink that doesn’t bring up any UI)
  4. Configure the Subclipse plugin to use JavaHL (JNI)
  5. Restart Eclipse
  6. Do a little victory jig (optional)

Yes the \\ is really needed, don’t (yet) understand why, but it works.

If you dislike Tortoise, then you can set the SVN_SSH variable to c:\\putty\\plink.exe -ssh -2 -A -l username

But as Martin said, plink has one disadvantage. It creates a msdos popup window each time it’s used…

JavaHL is also needed, SVNKit doesn’t use the SVN_SSH variable.

Talking about Tortoise… A while ago I encountered some annoying lock problems (maven clean install didn’t work because maven was not allowed to delete the target directory). This was caused by the Tortoise cache. Now I disabled it in total, which helped against my locking issue, and the performance of my explorer increased as well. So it’s a win/win situation. And since I like to develop using Ubuntu, I’m not used to see the svn status in my explorer window right away anyways (although I’ve to say, it can be useful, if it didn’t cause problems I would have kept it).

Perhaps this locking problem is related to having my workspace on an ext2 fs partition on my usb drive… Not sure who to blame, yet. On my new workstation I’ve not had such locking problems yet, with this tip the cache is performing good enough.

Changing spell checker language in Camino on OS X 10.4

From time to time I use my mac-mini to blog. But the spell checker of OS X is defaulted to Dutch, which is quite annoying if you try to blog in English. And I found that it’s not easy to change the language. In the end I found a FAQ entry (why didn’t I check the site before…) about how to change the spell checker language in Camino. Guess it’s time to switch to 10.5 :-)

Followup on the Belkin F5D8053 and Ubuntu

Seems my previous blog post about the Belkin is found quite often when people search for how to get it to work on Ubuntu in general, also with ndiswrapper. Please note, my post is not about getting it to work with ndiswrapper (that worked fine in my case, but I’m on 32-bit Ubuntu, and didn’t try it on 64-bit). There are quite some posts about getting it to work with ndiswrapper (also posts about it not working, will drop him a comment). This one also explains how to unpack the windows driver if you don’t have a windows installation.

Anyway, so far about using ndiswrapper. Recently ralink released a new version of it’s native linux driver, 1.3.1.0 which can be found on their linux support page, and with this one I got the Belkin F5D8053 working. It doesn’t see the 5Ghz network I’ve over here, but well I don’t want to do normal Wireless over that network anyways, since that will decrease the speed of the Wireless to Wireless bridge I setup. I’m still blaming incompatibility between the Belkin USB stick and the Apple Airport routers for the Belkin not being able to find the 5Ghz network.

What I had to do to get it working.

1. make sure you can build kernel modules: sudo apt-get install build-essential linux-headers-generic
2. check if your Belkin USB id is listed in the driver: lsusb | grep Belkin | awk '{print $6}';, which returns 050d:815c in my case. Then use the id found in grep -i '0x050d,0x815c' include/rt2870.h if that returns a result, then skip step 3 since your device is already supported by the driver (please note the '0x' added before the 2 parts and the ',' in stead of the ':').
3. If it’s not there add it: edit include/rt2870.h Search for Belkin; Copy/Paste that line and change the usb id of your device to that you found in step 2.
4. Edit os/linux/config.mk and change the HAS_WPA_SUPPLICANT=n HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n to =y.
5. Edit Makefile and remove any line containing /tftpboot (still don’t know why they are in there, and running make as normal user fails if they are in there)
6. make && sudo make install
7. Edit (as root) /etc/modules and add rt2870sta to it (remove ndiswrapper if you used that before to get it working).
8. Either reboot or do modprobe rt2870sta to get it working (if you used ndiswrapper before you first need to run modprobe -r ndiswrapper). You will also need a /etc/init.d/networking restart if you won’t reboot.

That was all I needed to do.

Debugging mails being send from applications

Ever needed to test the e-mail functionality of your application, on windows, without having access to a SMTP server? Try SMTP server for developers, a brilliant piece of software, so far.

You need .Net for it. It’s really easy to setup and use. Another advantage of this SMTP server is that when you test your application, you don’t have to worry about test e-mails being send to customers. This because the SMTP server doesn’t really send the messages, but just places all of them on disk.

Update: one disadvantage. You can’t get it to run on any other port then 25, which is inconvenient if McAfee is blocking port 25. I contacted the author a while ago, but no response so far. Guess I’ll have to add this functionality myself, but then I need to get up to speed on .Net first. Ah well, I’ll wait a little longer.

Talking about McAfee… It’s kinda weird, it blocks e-mails on port 25 if I use for example Java to send the e-mail. But if I use telnet to connect to port 25, all is fine?

Keyboard shortcuts

Perhaps you have noted that I added a new site to the list of sites I like: Windows Keyboard Shortcut of the Day. Using keyboard shortcuts just improves your work speed a lot.

A few windows shortcuts that I didn’t know before

Windows + BREAK
Go to system properties
CTRL + SHIFT + ESC
Taskmanager
Windows + R
Run command

Eclipse

I also found a nice blog entry about eclipse shortcuts. But he lacks to explain one of the uses for CTRL + T: if you have a certain function you can find which class implements that function with CTRL + T as well. Very useful when you are working a lot with interfaces.

This is also a good site with Eclipse shortcuts. Not sure if it’s a bad thing that it’s not updated to Eclipse 3.4, yet. One helpful command is missing on that list: CTRL + SHIFT + L. This lists all bound keyboard shortcuts and pressing it again gives you the opportunity to change and export them to .csv (at least the export function is there on Eclipse 3.4).

Mac OS X

And a while ago I found a nice site with lots of Mac OS X keyboard shortcuts. The shortcut to make your mac sleep quickly was provided by me :-) There is also a shortcut to restart your mac quickly without confirm, Cmd + Ctrl + Eject. Quite annoying if you use that one when you want to put your mac to sleep.

Quick status update

So, I’ve been inactive for a while now. With the new job and moving to a new place my time to blog has been very limited. I’ve been preparing some more drafts (the number of drafts is now bigger then the number of posts… Guess I should do something against that).

So, in short an overview of what has been keeping me busy (besides moving and getting used to the new job).

Wireless bridges

Trying to get a wireless to wireless bridge. Since I didn’t want to drill some more holes in my new place, I wanted a wireless to wireless bridge from the closet down stairs to my room upstairs. At Dynabyte they sold me a Belkin wireless N1 router which should, according to them, be able to create a wireless bridge with my Belkin wireless N router. “Of course” that didn’t work, so In the end I settled for a combination of an airport extreme and an airport express, which works perfectly. Even though 1 month had passed, the Dynabyte accepted the return of the N1 router, which is nice of them. And, fortunately for me, the N router has it’s use as well. I’m using it now as an access point, since I’m not able to get my Belkin USB stick to connect with more then 65Mbit to my Airport… And well, it’s better to have the wireless bridge at 5Ghrz and since my mac mini doesn’t support 802.11n I need a non 5Ghrz wireless network as well (oh, that Bekin USB stick doesn’t find the airport at 5Ghrz either, guess that’s why it’s still called Pre-N…)

IPv6

Having to switch to two airports had a nice side effect. I’m now able to use IPv6, which is a good thing IMHO. If only to be able to see the nice animated google logo on http://ipv6.google.com ;-)

APT-Cacher

I was always using apt-proxy to be able to update multiple debian based systems faster, since you only need to download the packages once that way. But a while ago apt-proxy stopped working so I went looking for an alternative. That alternative has become apt-cacher. More on this will follow later.

Quartz Scheduler

For the new job I’ve been looking at Quartz Scheduler, a cluster aware job scheduler. It looks nice, but the cluster features seem to be very limited. I’ll post something about this once the solution is completed.

Changing the <title> of my blog

And last, the page tittle on the blog has been changed a bit. I don’t want it to start with my blog name, since that makes the google results harder to read. So now it starts with the title of the blog entry, and then the name of the blog. It wasn’t that hard to change it, I just had to alter the header.php of the theme. I used this blog entry as a basis and then did my own “magic” with the header.php file and turned the default <title> into

<title><?php 
if (is_home()) {
        bloginfo('name');
        echo " &raquo; ";
        bloginfo('description');
} else if (! is_single() && ! is_page()) {
        wp_title('');
        echo " &raquo; Blog Archive &raquo; ";
        bloginfo('name');
} else {
        wp_title('');
        echo " &raquo; ";
        bloginfo('name');
}
?></title>

The '' in the wp_title call is needed to override the default » that is put before the title otherwise.