This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Autorstart .sh file fails to load after suspension

Tags: None
(comma "," separated)
User avatar
istar
Registered Member
Posts
23
Karma
0
Hello,

I use KDE on Kubuntu 12.04

I have added a .sh script to the ~/.kde/Autorstart/ (it is a simple bash script, remaping the Menu key with xmodmap so I can use it to open KRunner instead of Alt+F2).

Everytime the computer goes onto suspension or hibernation, the script does not load. On startup, it loads at a late stage.

How can I fix this?
User avatar
google01103
Manager
Posts
6668
Karma
25
files in ~/.kde/Autorstart/ only run when you start a KDE session, restoring from suspension or hibernation is not the same thing. Also, this folder is a legacy location and things are now placed placed in ~/.config/autostart/

No idea why you would loose your xmodmap setting (way above my pay grade) I too would have guessed they would be retained. Found some possible solutions http://ubuntuforums.org/showthread.php?t=1484156 https://wiki.archlinux.org/index.php/Acpid https://bbs.archlinux.org/viewtopic.php?id=88369

Google'ing shows lots of posts/bugs regarding this https://www.google.com/search?client=op ... el=suggest one really interesting one http://askubuntu.com/questions/129769/u ... 122#131122 says
UPDATE: I did some more research and it turns out this was because I had my USB keyboard plugged into my monitor's USB port. Simply plugging my keyboard into the back of computer fixed it. I guess when the monitor turns back on Ubuntu sees it as a new keyboard and doesn't feel the need to re-apply the .Xmodmap settings.


re: late stage starting using systemsettings -> .... -> autostart, you can set scripts to run pre-kde startup (this actually places those scripts in ~/.kde[4]/env


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
istar
Registered Member
Posts
23
Karma
0
Thanks.
I move the shell script to ~/.config/autostart/ but the script does not start at all. I specified the script should be a pre-KDE autostart in settings.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please make sure the script has executable permissions.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]