Intonation on a guitar is always a compromise, and always will be due to the nature of the instrument and how it is played.
I have spent hours and hours, and hours over the years trying to set intonation, using various methods, and never got it near enough for my (admittedly rather sensitive) ears.
The basic technique is to use a tuner and, for each string in turn, get the 12th fret harmonic and the fretted 12th fret note as near as you possibly can.
Earlier this year I took a guitar in to a tech for a fret repair, and while it was in with him, I asked him to do a full set up, including the intonation.
Anyway, the long and the short of it, is that he got it waaaay closer than I ever have. I shall now always use him when setting up a new guitar now.
I'll admit that intonation is one of my real bugbears though. It really niggles me if it is out. I guess I've probably taken up the wrong instrument really, as distorted electric guitars are so sensitive to the slightest of "out of tuneness".
So come one you guitar techs - what are the magic techy secrets for setting intonation ?