The shortest, most direct overland route is the bus, period. We took Scandinavian three times and Akamba once from Kampala to Nairobi. The Akamba ended up being a little better. As mentioned above, you could end up on a slow bus or one that breaks down, etc. That being said, taking a matatu to Busia or Malaba and getting transportation on the other side is a recipe for a much longer trip almost guaranteed.
The train: we never looked into it, you might be able to catch a ride on the cargo train (unclear if that is possible or 'legal') ... That being said, that also would not be guaranteed to do anything on time - even less so than the international busses.
If you don't care about when you arrive, then you could cobble together a variety of sources: matatus, local buses, bodas, etc. or even the train.