When Locke visited Richard in the 50s, he told Richard that he was gonna be born in a couple years, and told him to "come visit him", which he, of course, did.
The next time Richard went to see Locke, he wanted to know if he already knew the compass was his, a test which Locke failed, because he didn't know. From Locke's perspective, he hadn't given Richard the compass yet (wonky reasoning, yeah, haha).
Richard tried to get Locke to come to the Island as a teenager, but that didn't work either, Locke still didn't know he was meant to go to the Island.
Later, Richard says to Jack that he visited Locke, and Locke didn't seem like "anything special", to which Jack responds "I wouldn't give up on John Locke" (sounds like something Jacob would say...).
For trying to be the leader of The Others once on-island, Locke wasn't "in tune" with the Island for much of his life. Jacob didn't visit and touch him until he was tossed off a building in middle age (he visited most of the other candidates as young children, with the exception of the Kwons at their wedding).
Widmore was finally the one who, through Abaddon, brought Locke to the Island.
And when it's over, there will always be Lostpedia.