Have you tried the compose key functionality of X11? It works well for me. I've been using it for some time now.
Since you don't say what DE/WM you are using, I am going to describe the way I set it up for FVWM.
I put the following line in my ".xinitrc":
setxkbmap -option "compose:rwin"
The right windows key is now my compose key.
So for example to get an accent on the letter "e", I now type:
right windows key
accent ("`" or "'")
There is a screenshot of how to setup the compose key in xfce.