Create ~/.xinitrc (or maybe ~/.xsession) with two lines: the first loads your xmodmap file; the second starts the windowmanager. Since I am using xfce4, my .xinitrc file looks like so.
/usr/bin/xmodmap ~/.xmodmaprcExit. At the login screen change the "session" setting to "Default System Session" and log in.
exec /usr/bin/startxfce4
Here is my .xmodmaprc file.
keycode 112 = 30
! Swap Caps_Lock and Control_L
! since my pinkie hurts.
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
! bind the menu key to the right control key
! since my laptop does not have a right CTRL.
keycode 117 = Control_R
add Control = Control_R
! On the Compaq Presario 2800CA, the the following
! keycodes are listed for the special keys at the
! top of the keyboard.
!
! 163 i
! 158 envelope
! 154 magnifying glass
! 239 music note
! 174 - (volume down)
! 176 + (volume up)
keycode 174 = F18
keycode 176 = F19