| Summary: | startkde shutdown scripts code is broken | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Ivan Adzhubey <iadzhubey> |
| Component: | kcm_autostart | Assignee: | Laurent Montel <montel> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | kde |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
*** This bug has been marked as a duplicate of bug 346862 *** oh wait sorry. I misread this This has been fixed in 5.4. Sorry we missed this for so long :S See 96fdec6734087e54c5eee7c073b6328b6d602b8e of plasma-workspace In future if you have patches, please upload to git.reviewboard.kde.org |
The following code at the bottom of /usr/bin/startkde script is broken: # Run scripts found in <config locations>/plasma-workspace/shutdown for prefix in `echo "$scriptpath"`; do for file in `ls "$prefix"/shutdown 2> /dev/null | egrep -v '(~|\.bak)$'`; do test -x "$prefix$file" && "$prefix$file" done done The "$prefix$file" variables expand to something like "$HOME/.config/plasma-workspacescriptname.sh" which is NOT what we want, so the test -x inside the loop will always fail and no shutdown scripts executed ever. Should be replaced with something like the following: # Run scripts found in <config locations>/plasma-workspace/shutdown for prefix in `echo "$scriptpath"`; do shutdown_path="$prefix/shutdown" for file in `ls "$shutdown_path" 2>/dev/null | egrep -v '(~|\.bak)$'`; do test -x "$shutdown_path/$file" && "$shutdown_path/$file" done done Reproducible: Always Steps to Reproduce: 1. Copy any executable script into $HOME/.config/plasma-workspace/shutdown/ 2. Logout from KDE 3. Script will NOT execute