Bug 371907

Summary: Dolphin, KDE Framework, service menu installation and deinstallation ruby scripts are using KDE4 paths
Product: [Applications] dolphin Reporter: Rog131 <samrog131>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: charles.v.wright, elvis.angelaccio
Priority: NOR    
Version: 16.08.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rog131 2016-10-31 20:11:42 UTC
servicemenuinstallation ruby script has line:

$servicedir = `kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/"

servicemenudeinstallation ruby script has line:

FileUtils.rm(`kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/" + File.basename(archive))

Test - execute:

$ servicemenuinstallation test.desktop

Result:

/usr/bin/servicemenuinstallation:43: warning: key "application/x-gtar" is duplicated and overwritten on line 50
Single-File Service-Menu
test.desktop
/home/USER/.kde4/share/kde4/services/ServiceMenus/

=> The test.desktop is installed to the wrong place and the Dolphin 16.08.2 can't see it.

With the KDE Frameworks 5 the service paths are: 'kf5-config --path services' so the lines could be:

$servicedir = `kf5-config --path services`.split(':').first + "ServiceMenus/"

FileUtils.rm(`kf5-config --path services`.split(':').first + "ServiceMenus/" + File.basename(archive))

Making the changes - Testing - executing:

$ servicemenuinstallation test.desktop
/usr/bin/servicemenuinstallation:43: warning: key "application/x-gtar" is duplicated and overwritten on line 50
Single-File Service-Menu
test.desktop
/home/USER/.local/share/kservices5/ServiceMenus/

and the 

$ servicemenudeinstallation test.desktop

Will remove the test.desktop from /home/USER/.local/share/kservices5/ServiceMenus/
Comment 1 vinnywright 2016-11-01 21:05:53 UTC
just adding that this is true on Kubuntu-16.04 and Neon-dev/stable as well 

VINNY
Comment 3 Elvis Angelaccio 2017-04-20 09:09:50 UTC

*** This bug has been marked as a duplicate of bug 376922 ***