Closed ghost closed 1 year ago
I can not reproduce on my system.
Could you maybe modify the JetbrainsRunner::run method in jetbrainsrunner.cpp file and attach the log message?
void JetbrainsRunner::run(const Plasma::RunnerContext & context, const Plasma::QueryMatch &match)
{
qWarning().noquote()<<"running executable line" <<match.data().toString();
Q_UNUSED(context)
auto *job = new KIO::CommandLauncherJob(match.data().toString());
job->start();
}
running executable line $(/usr/bin/intellij-idea-ultimate-edition ) /home/deckweiss/Projects/InvoiceTrainer/Backend
Path is correct, the project opens fine from IntelliJ itself or even from terminal or dolphin "open with".
btw, the big exception seems unrelated. It only happens if IntelliJ is not already running. If it is running and I call the runner to open the Backend
project, I get only the single line of debug output you told me to add and then nothing happens.
Edit:
Ah I see the cause of the error.
This is my desktop files exec line : Exec=$(/usr/bin/intellij-idea-ultimate-edition %f)
I modified it to run all jetbrains apps in a subshell, because otherwise it would sometimes crash my whole plasma session (in some edgecases, due to some java runtime stack error. I had a project where it constantly happened, in other projects extremely rarely and in others never, didn't dig any deeper - a subshell solution seemed to make sense)
The %f
is a desktop file exec key https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables which signals where the path to the file goes, when opening a file with a program. It seems like your code ignores that and instead appends the path to whatever is in the desktop file.
If you feel like fixing this - I think you can either handle exec keys properly and append only when they arent present. Or work around them by calling the app binary directly by scanning where it is installed, since you read the desktop file anyway, you'd need only one additional step to find where the binary is located with for example whereis intellij-idea-ultimate-edition
or searching the $PATH (desktop files don't need to define the full path)
It seems like your code ignores that and instead appends the path to whatever is in the desktop file.
Yeah, because (at least in the past) it was unreliable. Some desktop files had %f, other %u and some did not have any. I will need to try out how the KDE desktop exec parser handles such cases.
All projects are found, recentProjects.xml is fine, most recent version of everything.
So far tested and affects IntelliJ, Clion and PyCharm
Running krunner through the terminal with
kstart5 --windowclass krunner krunner
and then trying to launch an IntelliJ Project, then Clion Project, then PyCharm project.Behaviour: The apps open as if I just ran them normally without the jetbrains runner, on their respective last open project instead of the one selected in krunner.
Output: