The ring does work on desire, but always the desire to rule, to dominate, to order, etc. One of the reasons it was "safe" with Gollum for so long was that Gollum really only cared about himself, not about ruling others or making the world fit his concept of better. Even he, however, used it to gain an advantage socially in his village. Thankfully, he was too weak to make much use of it and could only take advantage of the sneaking about bit.
The thing that is unique about hobbits is that they don't have much of a ruling, hierarchical structure. No king of their own, no real rules except common sense and mutual respect. This could be why the domination aspect of the ring didn't work on them in the same way.
Boromir, Gandalf, Galadriel, etc, would have used the ring to make the world "better" through ordering it and subjugating others. Sam is briefly tempted with that desire in his moments of thinking about making the world a garden, but his Hobbit-sense quickly kicks in.
__________________
But then there was a star danced, and under that was I born.
|