The lonesome cowboy, the drifter, has been a part of the western for as long as western movies have existed - from the early silents when Harry Carey and William S. Hart defined the character to the modern day with actors like Clint Eastwood carrying on the tradition. In the silents the drifter was usually a amiable fellow, a good bad guy if you like and it wasnt't until the 1950's when Hollywood began to tinker with the stereotype and create the derivative of the character that we know and love today, that the template was set.
He became the anti-hero.
Alan Ladd's Shane (1953) is a perfect example of the mysterious drifter. He seems a good guy, a gentle soul but there is something about him that suggests he could become meanness personified at the turn of a coin. And with the coming of this hero the western landscape changed too as the film noir style began to make its way into the western - previously the landscapes had been clear, bright, representing the spirit of the hero but with the later westerns the landscape became dark, twisted, crippled almost. There was now a surreal feel about the plains and deserts that had previously seemed so pristine. The lighting styles became more dramatic, moody and with this the drifter became a twisted mass of considerable complexity.
James Stewart played a great lonely avenger as Will Lockhart in The Man from Laramie and John Wayne gave us an even darker version of the same man as Ethan Edwards in The Searchers - both men have violent pasts, the precise details of which remain a mystery to the viewer.
Ethan Edwards though can not sit comfortably alongside the mythic drifter, for he is driven by a hatred, not of an individual or gang, but of an entire race. The characters played by James Stewart may have been driven by the lust for revenge also but that revenge is usually directed at those that have wronged the character, though Ethan Edwards hates the Indians simply because they are there. Ethan Edwards is not a nice character but The Searchers may be the finest western ever made.
Though he may have become a figure of darkness, the lonesome drifter is still a heroic character - a man who is self reliant and can survive any hardship thrown at him, and at his core he has strongly defined ideas of what is right and what is wrong.
Maybe the actor who has best personified this drifter is Clint Eastwood who played the character taken to the extreme in the dollar westerns, and played variations of that character several times since in movies like, High Plains Drifter, Pale Rider and The Unforgiven. Eastwood's character could murder without remorse though still maintain a basic goodness at his core. The character was a result of the anti-hero being filtered through the ambiguous morality of the Sixties.
For one things is certain - the lonesome cowboy will drift our way again.