|I am using KDE and trying to run a script at login to remap some keys. I cannot seem to get the script to run with consistency. It will run the first time I login into a session after a reboot. Any subsequent logins and it appears the script does not run.
Here is the script:
$ cat ~/bin/keymap
And the $HOME/.xmodmaprc has this:
$ cat ~/.xmodmaprc
! Swap Caps_Lock and Escape
remove mod4 = Super_L
remove Lock = Caps_Lock
keycode 66 = Escape
keycode 9 = Super_L
keycode 133 = Caps_Lock
add Lock = Caps_Lock
add mod4 = Super_L
To setup kde to run this script I entered "System Settings", "Advanced" tab, and "Autostart". Then, I added a script file (the above ~/bin/keymap file) as a symlink enabled at startup.
Now, what is odd that after I exit "Autostart" and then run "Autostart" again it shows two entries for the same script. See attached.
However, the ~/.kde/share/autostart only shows one file:
$ ls -l ~/.kde/share/autostart
lrwxrwxrwx 1 mike mike 21 Jan 6 18:55 keymap -> /home/mike/bin/keymap
-rwxrw-r-- 1 mike users 119 Dec 27 2009 xscreensaver.desktop
Is this the proper way to setup a script to run at startup?
If not, how/where should I run this script?
Is this a bug? (I have a 32-bit Gentoo box at work where this same method does work.)
Some additional info:
Linux mg1 2.6.36-2.slh.3-aptosid-amd64 #1 SMP PREEMPT Tue Dec 21 01:37:03 UTC 2010 x86_64 GNU/Linux
KDE Development Platform: 4.4.5 (KDE 4.4.5)