I'd like to change Ctrl key and Caps key by xmodmap because these keys have inverted positions between Japanese 106 keyboards and UNIX keyboards.
On SXDE 1/08 I login it a user whose login shell was /bin/csh. I put a .xmodmaprc file (see man xmodmap for example) on the home directory of this user. xmodmap was called from .login file.
I checked some documents and I can do it on bash by setting .bash_profile because default user shell of OpenSolaris OS 2008.05 is bash. I tried a login but .bash_profile appears not invoked. (I put "echo aaa > /var/tmp/aaa" on it but there's no "aaa" file on /var/tmp.
Alternatively, try the System -> Preferences -> Sessions tool. This allows you to run arbitrary commands when you login. I use it in an almost identical way to what you want. As the command, I have "xmodmap /export/home/chris/.xmodmap". I'm using a MBP and this set's my right command key to right click.