Bug 258507 - Error in one autostart script causes others to not run
Summary: Error in one autostart script causes others to not run
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 19:17 UTC by Daniel Hahler
Modified: 2010-12-01 19:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.