Bug 258507

Summary: Error in one autostart script causes others to not run
Product: [I don't know] kde Reporter: Daniel Hahler <kde-bugzilla>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Hahler 2010-12-01 19:17:05 UTC
Version:           unspecified (using KDE 4.5.3) 
OS:                Linux

I had a ~/.kde/env/start-custom.sh file which accidentally had the following first line, causing a "bad interpreter" error when trying to run it:
#!~ /bin/sh

This apparently caused another startup script (~/.kde/Autostart/foobar.sh) not to get run at all.


The following code appears to be used to source the env scripts in /usr/bin/startkde, but I cannot see how that would cause it to abort here (given that there is no "set -e" used):

    libpath=`kde4-config --path lib | tr : '\n'`

    for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
      for file in "$prefix"*.sh; do
        test -r "$file" && . "$file"
      done
    done


Reproducible: Always
Comment 1 Daniel Hahler 2010-12-01 19:26:47 UTC
I am closing it as invalid myself: apparently the interpreter line does not change anything: now it still works when changing it back to the wrong one.

Also debug logging in startkde shows that all env scripts gets sourced.

The reason for the Autostart entry to not being honored at first must have been something different.

I've noticed that the order of the "Script File" entries in "System Settings - Autostart" changed for some reason, and that appears to be related; my new script was at the bottom, now it's at the top.