Bug 481327 - Dolphin: custom services are not shown in the context menu
Summary: Dolphin: custom services are not shown in the context menu
Status: RESOLVED DOWNSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.01.95
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-14 15:57 UTC by Jayes
Modified: 2024-02-14 22:06 UTC (History)
2 users (show)

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


Attachments
attachment-469801-0.html (775 bytes, text/html)
2024-02-14 22:06 UTC, Jayes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jayes 2024-02-14 15:57:56 UTC
SUMMARY
***
I copied my custom 'services' 
from (Fedora 39)  ~/.local/share/kservices5/ServiceMenus/
to      (Fedora 40)  ~/.local/share/kservices6/ServiceMenus/
On previous installations copying like this made the services available in dolphin, but this time the do not show up.
The root directories
/usr/share/kservices5/ServiceMenus/
/usr/share/kservices6/ServiceMenus/
both exist, but /usr/share/kservices6 contains 0 items.
***


STEPS TO REPRODUCE
1. Copy your .desktop custom services from Plasma 5 to Plasma 6
2. Open dolphin
3. Use or configure custom services

OBSERVED RESULT
 Right-click : no custom services. 
 Configure -> Context menu : no custom services

EXPECTED RESULT
Custom services to be available.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 40, KDE spin (branched)
(available in About System)
KDE Plasma Version: 6
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Comment 1 Jayes 2024-02-14 16:14:53 UTC
Sorry, I reported KDE Plasma Version: 6 ....  this must be 5.93.0
Comment 2 fanzhuyifan 2024-02-14 17:29:53 UTC
Thank you for your bug report!

What is the output of `qtpaths --locate-dirs GenericDataLocation kio/servicemenus`?

These are the directories in which dolphin looks for service menus.

https://develop.kde.org/docs/apps/dolphin/service-menus/
Comment 3 fanzhuyifan 2024-02-14 17:30:20 UTC
Waiting for info
Comment 4 Jayes 2024-02-14 18:16:01 UTC
(In reply to fanzhuyifan from comment #3)
> Waiting for info

I have already restored Fedora 39, so I ran the command after booting a Fedora 40 (KDE spin) live iso from usb.

$qtpaths --locate-dirs GenericDataLocation kio/servicemenus
bash: qtpaths: command not found...
(although qt6-qttools is installed)

but this works:

$/run/media/liveuser/Fedora/bin/qtpaths  --locate-dirs GenericDataLocation kio/servicemenus
/usr/share/kio/servicemenus

$ls /usr/share/kio/servicemenus/
dragonplayer_play_dvd.desktop  kgpg_encryptfile.desktop    kgpg_viewdecrypted.desktop
installfont.desktop            kgpg_encryptfolder.desktop  konsolerun.desktop

So that is correct, but it is not where the user installed sevicemenus are.
On Fedora 39 I get the same result, but my (user) services work there.

Regards,
JS
Comment 5 fanzhuyifan 2024-02-14 18:38:06 UTC
(In reply to Jayes from comment #4)
> (In reply to fanzhuyifan from comment #3)
> > Waiting for info
> 
> I have already restored Fedora 39, so I ran the command after booting a
> Fedora 40 (KDE spin) live iso from usb.
> 
> $qtpaths --locate-dirs GenericDataLocation kio/servicemenus
> bash: qtpaths: command not found...
> (although qt6-qttools is installed)
> 
> but this works:
> 
> $/run/media/liveuser/Fedora/bin/qtpaths  --locate-dirs GenericDataLocation
> kio/servicemenus
> /usr/share/kio/servicemenus
> 
> $ls /usr/share/kio/servicemenus/
> dragonplayer_play_dvd.desktop  kgpg_encryptfile.desktop   
> kgpg_viewdecrypted.desktop
> installfont.desktop            kgpg_encryptfolder.desktop  konsolerun.desktop
> 
> So that is correct, but it is not where the user installed sevicemenus are.
> On Fedora 39 I get the same result, but my (user) services work there.
> 
> Regards,
> JS

Interesting... So I am on Arch Linux and that command also outputs the directory of user installed servicemenus -- ~/.local/share/kio/servicemenus. Perhaps this is a configuration issue? As per the documentation in https://develop.kde.org/docs/apps/dolphin/service-menus/, the default paths are 

~/.local/share/kio/servicemenus
/usr/share/kio/servicemenus

So using kservices5 and kservecis6 directories seems to be something that distros are responsible for.
Maybe you could also try copying things into ~/.local/share/kio/servicemenus to see if that works?
Comment 6 Jayes 2024-02-14 19:05:49 UTC
I have put it to the test.

On Fedora 39 (plasma 5)
The services can be in ~/.local/share/kservices5/  (or any subdirectory)
The services can NOT be in ~/.local/share/kio/servicemenus/

So Fedora 39 does not follow the KDE guidelines.

On Fedora 40 (plasma 6)
The services can NOT be in ~/.local/share/kservices5/  (or any subdirectory)
The services can INDEED be in ~/.local/share/kio/servicemenus/

So Fedora 40 DOES follow the KDE guidelines.

It appears I have reported a bug that was in fact a fix.

Sorry for wasting your time, and thanks for your help.

JS
Comment 7 fanzhuyifan 2024-02-14 19:16:48 UTC
(In reply to Jayes from comment #6)
> I have put it to the test.
> 
> On Fedora 39 (plasma 5)
> The services can be in ~/.local/share/kservices5/  (or any subdirectory)
> The services can NOT be in ~/.local/share/kio/servicemenus/
> 
> So Fedora 39 does not follow the KDE guidelines.
> 
> On Fedora 40 (plasma 6)
> The services can NOT be in ~/.local/share/kservices5/  (or any subdirectory)
> The services can INDEED be in ~/.local/share/kio/servicemenus/
> 
> So Fedora 40 DOES follow the KDE guidelines.
> 
> It appears I have reported a bug that was in fact a fix.
> 
> Sorry for wasting your time, and thanks for your help.
> 
> JS

Thank you for your investigation! Perhaps you might want to share that with the fedora people, if there is some sort of migration guide from plasma 5 to plasma 6
Comment 8 Jayes 2024-02-14 22:06:52 UTC
Created attachment 165825 [details]
attachment-469801-0.html

My thoughts exactly. In april, when people start to upgrade, this should 
not be an issue.


On 2/14/24 8:16 PM, bugzilla_noreply@kde.org wrote:
> Perhaps you might want to share that with the
> fedora people, if there is some sort of migration guide from plasma 5 to plasma
> 6