I really didn't intend to write this post. When Waldo posted The Geek Closet, about the Star Trek franchise's reluctance to take on gay characters, I wrote one truly geek note about the two direct lesbian scenes/references [one in Deep Space Nine and one in The Next Generation], which he took--at least partly--as me evading his point.
So then I wrote another five paragraph response ... that the blogspot comment editor promptly ate.
I hate it when that happens. So I thought I would sort of semi-replicate it here, with a few addenda.
First note: I am not an incredible fan of Star Trek novels [although the ones by Peter David are generally readable], but I have polished off a few in airports or hotel lounges when there was nothing better available. From that random sampling I know that on at least a couple occasions LGBT characters have also made it into the franchise via print. But again that doesn't serve to answer Waldo's question about why no gay characters on Star Trek.
It has to do, I think, with the difference between actual science fiction and science fiction television.
Real SF--you know, in books--has been dealing critically with issues of human sexuality for a long time. I think back immediately to Ursula LeGuin's The Left Hand of Darkness, which won all the big SF awards, both Hugo and Nebula, in 1969-1970--making it a close contemporary of Star Trek. I bookend that with Michael Flynn's 1990 novel In the Country of the Blind in which one (actually, two, but the second half of the pair has a much smaller role) of the supporting characters just happens to be gay. He's gay like other characters in the book are left-handed, or eat pizza--just there as part of the entourage. It suggests to me an important sort of advance in a book where the central theme is not using SF to explore human sexuality, that there just happen to be gay characters walking around doing normal things. Real life context.
In between, I think of Spider Robinson, who redid a lot of old Robert Heinlein themes, sometimes with gay characters [Heinlein himself repeatedly dabbled with sexuality, but you always got the feeling his lesbian or bisexual women were just there to make male readers salivate]. I also think of David Drake, one of whose best pre-Hammer's Slammers SF military novels [The Forlorn Hope], which includes two gay couples (one male, one female) as main characters. You not only like them by the end [if you can handle all the gore], but the other characters either like them or hate them without the slightest inkling that their sexuality makes a difference to whether or not they are liked. [OK: truth in advertising: one lieutenant does fantasize about getting it on with two lesbians.]
In short, it does not surprise me when I pick up an SF to have main, characters, supporting characters, or just plain walk-ons turn out to be LGBT--kind of like real life. What surprises me is the rare occasion when I find an author who seems to think that he or she is the first to discover that you can write gays into a plot and then obsesses about it. I don't tend to reread them very much. Except maybe for some of Samuel R. Delaney's work; or John Varley's....
I think that the reason SF TV (and major market SF movies) never caught up the real SF in books is that there aren't enough of us to make any movie a success. So the movie or TV series has to draw in the cartoon fans, the graphic novel and comic book fans, the computer nerds who always hoped the blonde with big tits would fall for them, and people who just like exploding aliens.
Which partly explains why Arnold Schwarzenegger movies make it, and brilliant offerings like Blade Runner become cult classics but don't make anywhere near hundreds of bazillions of dollars.
Note two: if SF movie-goers really knew what kind of stuff Philip K. Dick wrote [his stories provided the very loosely interpreted background for films like Blade Runner and Total Recall] they'd probably run screaming from the building. If you really want to experience literary brilliance in an SF mode, go find a copy of Flow My Tears, The Policeman Said, or Ubik.
Note three: It has always perplexed me, however, that for TV and movie SF the prospect of homosexuality was more daunting than the idea of having sex outside your species. Hell, the Star Trek franchise started with Captain Kirk getting it on with green alien women, and in The Next Generation characters routinely marry and/or get pregnant with partly alien babies. But queers? No, not gonna do queers.
Note four: It was also an unhappy experience to discover that one of my formerly favorite SF writers--Orson Scott Card--shares a pretty blatant case of homophobia with his Mormon brethren and cistern. This was particularly disturbing as Card writes some of the very best narratives including dysfunctional families that I have ever read, and I realized later that I had always been waiting for him to deal with an LGBT character in such a situation. Not gonna happen.
Note five [have you noticed yet that these notes are taking over?]: I had the good fortune to meet mega-hit military SF author David Weber a few years back. While we were discussing his massively best-selling Honor Harrington series, he said in an offhand way about one of the supporting characters, "Oh yeah, he's gay, and I'll get around to mentioning it in one of the novels. But nobody in my universe obsesses about it, and it wasn't germane to any of the scenes he's already appeared in."
Point being [and if I reach really diligently I am sure I'll be able to lay hands on one]: SF TV and movies, as a mass market entertainment vehicle are often racy, but rarely radical. I have to say that I was not surprised at all that Brokeback Mountain appeared in the Western genre long before any producer even considered Brokeback Starship Troopers.