Yesterday I tried Plasma 6.5 Beta on my laptop. Everything works fine except one applet: USwitch - KDE Store . It reports
module "org.kde.plasma.private.quicklaunch" is not installed
Said module was imported in this file: package/contents/ui/main.qml · fdb573e4c03d73023f3555968a186c15d4233e8b · Jakub Lipiński / uswitch · GitLab
Turns out that the applet uses “Logic” from quicklaunch applet to launch desktop entry
Logic {
id: kRun
function launch(desktopFile) {
openUrl('file:' + desktopFile)
}
}
After digging through the repositories, I found that the quicklaunch applet was ported to plasma_add_applet macro, and no longer provides a “private” qml library for others to import
Then I’m curious to find out how do other plasmoids launch desktop entries, so I searched “launcher” on store.kde.org, but all I could find is
import org.kde.plasma.private.quicklaunch
(which is not available anymore in plasma 6.5), or
import org.kde.plasma.private.kicker
(which seems too complicated for what I need)
I also tried to search for “run command in plasmoid”, hope to workaround this by just
kde-open /path/to/entry.desktop
but got this answer:
you can’t do this straight out of qtquick/qml …
Looking into Plasma’s QML API docs, there’re just UI components, nothing about launching desktop entry or running command …
So I wonder what’s the best practice to launch a desktop entry in plasmoid? Do you really have to write a C++ module only to do this job?
I know some C++, but plasmoid with C++ modules can’t be installed from KNewStuff “Get New” dialog, and needs to be re-compiled every time plasma updates, which makes it not so convenient for users. I would like to avoid C++ modules in plasmoids if possible.