Hmm, I wouldn't bother getting something as good as a 9800GT if you're not going to be doing anything graphically intensive on it, obviously if you want to use it for modeling, graphic design or gaming then go for it.
4GB is probably overkill, but Ubuntu has become quite memory intensive of late (comparatively) so it may not be a bad idea. I think a better idea would be to replace that old Pentium 4 with something a bit newer from the Core 2 era - just make sure the FSB is compatible! It should speed things up greatly and the whole system should run quieter and cooler as Pentium 4s are power-hungry beasts.