Coder Social home page Coder Social logo

Comments (3)

alex1701c avatar alex1701c commented on June 15, 2024

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();
}

from jetbrainsrunner.

 avatar commented on June 15, 2024
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)

jetbrains-idea.desktop.txt

from jetbrainsrunner.

alex1701c avatar alex1701c commented on June 15, 2024

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.

from jetbrainsrunner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.