Open star-buck opened 5 years ago
Huh, I just went through this in Dolphin 18.12.3 on Manjaro and git master on Neon Dev Unstable and it worked perfectly in both cases. What version of Dolphin and/or frameworks are you using?
On my Arch machine with Dolphin 18.12.1 I can reproduce this issue. Whereas on Manjaro VM with the same dolphin version it worked.
maybe if the folder kservices5 is already there from the beginning, it works?
No, it does not.
Had a quick look and it turns out that the service menu installation and deinstallation scripts are ruby scripts. So first step, does either of you have the ruby interpreter installed?
If not, it would seem that knewstuff lacks some error checking on the commands being run. While it in that case would be a packaging issue (Dolphin runtime-requires ruby), KNS should also be able to handle such a situation more gracefully, and with better feedback to the user.
If not, could you paste me the console output of trying to perform the installation step? The scripts have a fair bit of useful output, so it'd be very helpful for tracking it down :)
Is a switch to KNS possible or why ruby?
In reverse order: Why ruby, i don't know why that specific language choice (except historical, it's apparently been the case since at least 2010, which is as far back as the vcs history goes for those files).
For the first point, the way KNS works for things that aren't just simple files that go into a folder somewhere (like kpackages such as plasmoids) is to hand off the (un)installation of things to some external application. In this case it's two ruby scripts which decompress the archive KNS downloads and moves it somewhere kservice can find them. (so short answer to that point, no, switching to kns isn't really possible, though we might arguably be able to port the scripts to something not ruby, though getting that past review might be less than straightforward)
though we might arguably be able to port the scripts to something not ruby, though getting that past review might be less than straightforward)
The scripts are installed as normal binaries and treated as such, so arguably we'd be able to port them to guiless qtcore binaries rather than scripts... which might also solve a translation issue mentioned in both scripts (which currently have untranslatable strings in them).
@apachelogger may be able to comment further since he just rewrote the ruby scripts at play here to be more robust.
Not sure what comment you are looking for, but it's not entirely unlikely that the installation will be 100% more reliable in 19.04 with the rewritten scripts.
Oh actually, let me add that I think the reason it is written in ruby is because the installation runs in its own process so explosion don't bring down dolphin, also I expect expressing the same logic in cpp is probably fairly clunky.
Mind, I am just guessing here. This tech was written in the early days of dolphin. It may well be that the author just fancied writing something in ruby and so they did :man_shrugging:
Test: Open Dolphin, go to settings, Service Menus, Click to dwnload new ones and pick Tocuh File under Newest:
After installation, it doesnt appear in menu. Also, according to this documentation https://askubuntu.com/questions/719262/how-do-i-add-custom-items-to-the-context-menu-in-dolphin-in-kde-5
it should have been installed under HOME/.local/share/kservices5/ServiceMenus:
But it didnt work here, where there was no folder "kservices5" and therefore nothing inside.
Instead all files have been downloaded here:
When manually adding the folders and putting the desktop file there, it works.