I haven't needed xmodmap for quite a while, but when I did, I put it in the .profile (it was running ksh), with an if check around it.  The if check would check to see if a variable was set, and if not, run xmodmap and set the variable.  You could also check to make sure DISPLAY is set so if you ssh in, it won't try to run xmodmap.
<br><br><div><span class="gmail_quote">On 9/14/07, <b class="gmail_sendername">Nathan Stien</b> &lt;<a href="mailto:nathanism@gmail.com">nathanism@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What&#39;s the least ugly place to automate &quot;xmodmap ~/.Xmodmap&quot; for an X session?<br><br>I have tried a few different places over time and decided they were<br>all ugly hacks.&nbsp;&nbsp;Gnome seems to notice you have ~/.Xmodmap and ask you
<br>if you want it executed, but it has the very unfortunate downside (for<br>me) of being Gnome.&nbsp;&nbsp; ;-)<br><br>So what do y&#39;all do?&nbsp;&nbsp;The machines I deal with generally have either<br>KDE or Xfce.<br><br>--<br>Nathan P. Stien
<br>Consulting Engineer / Software Developer<br>Embedded Systems Electronics and Software<br><a href="http://linkedin.com/in/nathanstien">http://linkedin.com/in/nathanstien</a><br>Mobile: 309.241.2581<br>_______________________________________________
<br>Cialug mailing list<br><a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a><br><a href="http://cialug.org/mailman/listinfo/cialug">http://cialug.org/mailman/listinfo/cialug</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Tim