Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mgantOffline
Post subject: kde startup script not working [solved]  PostPosted: 07.01.2011, 02:55



Joined: 2010-10-03
Posts: 4

Status: Offline
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:

      Code:

$ cat ~/bin/keymap
#!/bin/bash


/usr/bin/xmodmap $HOME/.xmodmaprc


And the $HOME/.xmodmaprc has this:

      Code:

$ 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:

      Code:

$ ls -l ~/.kde/share/autostart

total 4
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
Qt: 4.6.3
KDE Development Platform: 4.4.5 (KDE 4.4.5)
kde4-config: 1.0



snapshot2.png
 Description:
 Filesize:  16.82 KB
 Viewed:  4478 Time(s)

snapshot2.png




Last edited by mgant on 15.01.2011, 03:35; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
finottiOffline
Post subject: RE: kde startup script not working  PostPosted: 07.01.2011, 10:05



Joined: 2010-09-12
Posts: 325

Status: Offline
Probably not what you want, but you can use KDE own tools to remaps special keys. Oddly enough, it is in systemsettings -> "Regional and Language" -> "Keyboard Layout" -> "Advanced".
 
 View user's profile Send private message  
Reply with quote Back to top
mgantOffline
Post subject:   PostPosted: 15.01.2011, 03:35



Joined: 2010-10-03
Posts: 4

Status: Offline
Well, I found the solution to this. Under System Settings->Advanced->Session Manager in the On Login section the "Restore previous session" must be selected.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio