In 1904, Dublin could be a confining place to be. No one feels this more than Stephen Dedalus (though many felt it as much). Between English oppression and the enormous influence of the Roman Catholic Church, it was quite hard for one to feel any true sense of independence or self-empowerment. As in A Portrait of the Artist as a Young Man, Stephen strives for personal freedom, but in Ulysses, we begin to see a more mature search. Stephen begins to learn that complete freedom can itself be confining, and at the start of this novel he feels cut off from the world around him, isolated and trapped in his own head. At times, it is unclear if Stephen has become free or simply been abandoned. He does not give up the search, but the question does present itself: if freedom itself can be confining, than what exactly does it mean to be free?
Stephen's guilt over the death of his mother has made him realize that if one cares about and feels obligations to other people, then regardless of what one says, they can never be completely free.
Laughter possesses salvatory power in the book. It is the only tool the characters have to undermine their own vanity, which, particularly in the case of Stephen, is the most confining thing of all.