Craig Box's journeys, stories and notes...


Greasemonkey helps the Internet get what it wants

May 23rd, 2007

Another great way that the Internet gets what it wants is with the Greasemonkey extension to Firefox. It lets you automatically add to the Javascript on pages of your choice.

I wrote a script to suffix "open new" onto RequestTracker searches, as version 3.6's quick search box seems to show you all the tickets, even the ones that have been resolved for three years. You will need to change the sites this applies to to match your own.

Today, a workmate asked for my Expert-Sex-Change login, to get around the ROT13 and blurring they now put on their answers if you're not signed up. (Cheatin' bastards want Google juice for it, be prepared to show it to everyone.) "I bet someone's written a Greasemonkey script for this", I exclaimed, and lo, they had. I reproduce it here with a nice little click-to-install as the author's WordPress eats the quotes.

By the way, if you do any web development at all (and I don't do very much - just tidying things up), install the Firebug extension. Right now. It's fantastic. We do everything through this. Everything.

ACT presents "Object reference: Not set to an instance of an object." when connecting via Citrix

May 23rd, 2007

The ACT! contact management application is a pig. There, I've said it. It's one of those programs that keeps changing owners - that's how much of a pig it is. Seems no-one really wants it.

They re-wrote it in .NET a couple of versions ago, and it ought to be better, but it isn't. ACT! throws "Object reference: Not set to an instance of an object." (a reasonably common .NET error) whenever it feels like it.

In my particular case, I could open it fine when using a Citrix desktop session, but as a published application, it would die all the time.

I tracked the problem to the seamless window. When you run seamlessly, you get Citrix's WFSHELL.EXE running, and not EXPLORER.EXE. You can force a published application to run at a certain screen size, which runs as if you were in a desktop. Hopefully the ACT! forums will give me a better answer.

Pimp my junk!

May 22nd, 2007

Note: this is all now sold. 

Compaq Proliant ML350 G3

Just because we don't need it any more, doesn't mean you don't!

The bottom three are servers we've used internally, and I'd be sad to see go if I was that kind of nerd. Especially the quirky one. Ever seen a 6GHz processor? That server has one, if you believe the BIOS. Or a 1.4GHz processor, if you believe the summary screen. Or a 3GHz processor, if you believe what it had when we bought it.

"The specified directory service attribute or value does not exist" connecting to Microsoft Exchange IMAP

May 21st, 2007

Are you getting "The specified directory service attribute or value does not exist." when connecting to Exchange IMAP? Wait a while. This error will go away - if you've just mail-enabled your account, Exchange will accept the username and password now, but it will take a few minutes for the mailbox to actually catch up.

Rid your life of sequential media

May 20th, 2007

Got VHS tapes? Borrow a friend's DVD recorder and copy them to digital. Unless, of course, you borrow said DVD recorder, and find it dead.. then find it has magically come back to life a week later.

14 VHS tapes in the cupboard... net stuff worth saving: 10 minutes worth.

Interesting notes: programs I used to watch on TV before we got the DivX Channel: The Sopranos, Boston Public & Ed.

Here's the 7 minute piece that was worth keeping for posterity: an interview David Strassman did with Tim Finn.

[youtube]http://www.youtube.com/watch?v=UtS-PbcD8Dk[/youtube]

(Americans don't get quite as much Neil and Tim as we do down here, so they like when people like me put things like this online...)

Ruby "gem cleanup" returns "Unknown command cleanup"

May 18th, 2007
root@redhut:/usr/lib/ruby/gems/1.8# gem cleanup
ERROR:  While executing gem ... (RuntimeError)
    Unknown command cleanup

It's a bug in 0.9.3, and it will be fixed in an upcoming release.

Happy birthday

May 16th, 2007

Off The Record (ok, the name sucks) is 1 year old today.  Wow.

How did I find this out? Someone randomly suggested it might be Prof Eric's birthday today, and I mentioned it last year.  (On a different date however).  Pretty cool co-incidence though.

How did I confirm it? I was asked to enter my username and password to post this,  so I guess WordPress cookies have a 1 year lifetime.

Building NM-PPTP from source

May 13th, 2007

I had to spend a lot of time today re-remembering how to take a CVS/SVN tree and make a distributable package of it. Here are my notes, for me next time, and for anyone interested, now.

sed -i -e "s/AC_INIT(NetworkManager-ppp_vpn, 0.7.0-beta, eemynotna@gmail.com, NetworkManager-ppp_vpn)/AC_INIT(NetworkManager-pptp, 0.6.5, eemynotna@gmail.com, NetworkManager-pptp)/" configure.in
sed -i -e "s/SUBDIRS = src auth-dialog auth-dialog-general properties po/SUBDIRS = src auth-dialog properties po/" Makefile.am
sed -i -e "s_auth-dialog-general/Makefile__" configure.in
ln -s /usr/include/pppd src/pppd
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make dist

What's all that do, then?

  1. Downgrade the version number
  2. Remove the new auth-dialog-general, which isn't ready for primetime yet, from the Makefile
  3. (as above, but for the configure script)
  4. Link the system pppd dir - not actually packaged, but <tt>make dist</tt> fails if the PPP headers are missing
  5. Run the GNOME autogen script, which runs the autotools
  6. Builds a NetworkManager-pptp-0.6.5.tar.gz, with a configure script, ready for packaging.

It helps to remember things. Before re-reading the docs, and realising there was an autogen script, I was running all these commands (which of course required Perry to figure out, as I hate the autotools)

aclocal
autoheader
intltoolize --copy --force --automake
libtoolize --force
automake --copy --add-missing
autoconf
./configure --with-pppd=/usr/include/pppd
ln -s /usr/include/pppd src/pppd
make dist

New NetworkManager PPTP package (fixes AMD64 crashes)

May 13th, 2007

(Updated updated update: historical information only; blog posts from 2007 are rarely relevant in 2011.)

I've built a new Ubuntu package of the PPTP plugin for NetworkManager, from a recent SVN checkout. It closes some bugs, and hopefully solves a number of other issues with the stability of the program.

Download links removed; if you're still running Edgy or Feisty, you should really upgrade.

I will rely on comments here to gauge the success of this version, and if it works well, I'll get it uploaded for Gutsy, and possibly push for an -updates release.

Thanks to Ed Schofield for pointing out I'd only linked to i386 packages, and compiling me an AMD64 package. He reports it clears up the segfault. Andrew Mitchell also contributed an AMD64 Edgy deb.

If you've come here from Launchpad, welcome, and please take the time to have a read around. I sometimes post about interesting stuff.

Debugging .NET - "Common Language Runtime Debugging Services Application has generated an exception that could not be handled"

May 11th, 2007

ProfileTool doesn't work on half the machines I try it on. I get an error like:

Profiletool.exe Common Language Runtime Debugging Services
Application has generated an exception that could not be handled.
Process ID=0x14 (1300), Thread Id=0xe8(232)

Click OK to terminate the application.
Click CANCEL to debug the application.

There's no point searching Google for the process ID and thread number; they're unique to your instance.

What can you do here? You get an error suggesting that 'debugging failed' if you hit Cancel - this is correct, because you don't have a debugger installed!

First step, if you're running your .NET application off the network, stop, move it to your local disk, and try again. The default security policy doesn't let you do this - you can edit it in the Administrative Tools if you need to.

Now, if you still get the error, drop to a command line, and run the following:

ProfileTool 2>error.log

This redirects the standard error output to error.log, which you can then read. Linux/UNIX outputs this to the terminal by default; Windows hides it.

Thanks to Frank Racis, by way of Mohamed Yehia.

The actual error, in this case, was "No mapping between user accounts and security IDs was done", which really means "don't catch System.SystemException when you are throwing System.Exception". And when you're testing new builds, don't sit behind an ISA server which aggressively caches the old build.