I have run into this a couple of times now, and always forget what I did the last time to solve it. Searching both this forum and Google gives many wrong answers, so this is for future reference. Or for someone else with the same problem.
KDM starts at init 5, and I need to run xmodmap when I log in to KDE to map the keys of my Logitech MX510. Neither making the file .Xmodmap with pointer = 1 2 3 6 7 4 5, nor making .xsession or .xinitrc with xmodmap -e "pointer = 1 2 3 6 7 4 5" executes xmodmap.
The damn file is supposed to be called .xprofile these days. So there.
edit desktop file ;-)
<your window manger>.desktop .... point it to a small script containing what you want
If you need an example give me a pm
"just below me"
SG-3: please post it for all users
You could also try this:
echo "pointer = 1 2 3 6 7 4 5" > ~/.xmodmaprc cd ~/Desktop/Autostart ln -s `which xmodmap` xmodmap
Most DEs and some WMs run all programs, links and scripts during startup from ~/Desktop/Autostart.