Bug 348436

Summary: Clicking shell scripts on desktop opens Kate instead of running them
Product: [Frameworks and Libraries] kio-extras Reporter: bugs5.kde.org
Component: defaultAssignee: Sebastian Kügler <sebas>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bugs5.kde.org, hein, justgivemeafkenaccountplx, kde, marco_parillo, mtest31, oliviervdtoorn, yoann.laissus
Priority: NOR    
Version: 5.3.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description bugs5.kde.org 2015-05-30 07:18:19 UTC
I set my desktop to folder view and I have a few shell scripts there.

After my upgrade from KDE 5.3.0 on Kubuntu 15.04 to KDE 5.3.1 using the Kubuntu Team Backport PPA, the shell scripts open now in kate instead of being run as script.

Reproducible: Always
Comment 1 Dan Mac 2015-05-30 08:18:49 UTC
I'm seeing the same behaviour. Possibly related to https://bugs.kde.org/show_bug.cgi?id=348437 both could fundamentally be a problem with the desktop and not with Kate.
Comment 2 Marco Parillo 2015-05-30 10:45:41 UTC
Same for me, after upgrading to the backports PPA with Plasma 5.3.1. It did not happen when the backports PPA had only 5.3.
Comment 3 Olivier van der Toorn 2015-05-30 10:50:20 UTC
Same here, though here it tries to open the script with Okular for some reason.
Comment 4 Yoann Laissus 2015-05-30 17:04:35 UTC
After some investigation, the issue comes from kio-extras with this commit :
http://quickgit.kde.org/?p=kio-extras.git&a=commit&h=fe1f50caaf24c47000938c9ac36a7f9a304f3c96

(Tested on Arch)
Comment 5 Marco Parillo 2015-05-30 18:16:50 UTC
(In reply to Yoann Laissus from comment #4)
> After some investigation, the issue comes from kio-extras with this commit :
> http://quickgit.kde.org/?p=kio-extras.
> git&a=commit&h=fe1f50caaf24c47000938c9ac36a7f9a304f3c96
> 
> (Tested on Arch)

Does that mean the product or component needs to change?
Comment 6 Eike Hein 2015-06-01 15:42:54 UTC
I can't reproduce this with current git for KF 5 and plasma-desktop. Double-clicking a "blubb" that's marked executable and starts with a shebang runs it fine here.
Comment 7 Siddhartha 2015-06-01 17:58:44 UTC
I think this is because of the kio settings for executable scripts.

Check if $XDG_CONFIG_HOME/kiorc has "[Executable scripts] behaviourOnLaunch=open".
Change 'open' to 'execute' for always executing scripts on clicking. Alternatively, remove the whole [Executable scripts] section, so that you get a prompt each time whether to execute or open the script.
Comment 8 mtest31 2015-06-01 18:16:41 UTC
*** Bug 348551 has been marked as a duplicate of this bug. ***
Comment 9 Yoann Laissus 2015-06-01 20:33:08 UTC
(In reply to Eike Hein from comment #6)
> I can't reproduce this with current git for KF 5 and plasma-desktop.
> Double-clicking a "blubb" that's marked executable and starts with a shebang
> runs it fine here.

Indeed, it seems to be fixed with the latest git.