I have Matlab installed, and the only way for me to open it is from the command line. I made a shortcut to launch it, but I would really like to be able to launch it from the application launcher or with krunner.
Sorry, I think I was a little unclear in my post. By only being able to launch it in the command line, I mean only being able to launch the executable file, ie. ./matlab in its respective folder. Typing matlab into krunner does not give me anything.
Again, create a menu entry yourself using the menu-editor.
You can specify the directory the program should run in as well there.
I am able to create a menu entry in the menu editor, however it only works if I use the Run in terminal feature which launches an unwanted konsole window (I get this same issue with my desktop shortcut which I was hoping to avoid). I am still unable to launch it from krunner.
You should of course not escape the space, nor use quotes or similar. In the menu editor you should do just the same as in your shortcut (it should even be possible to move the shortcut’s .desktop file to ~/.local/share/applications/ to make it appear in the menu).
Most existing menu entries pass arguments to the command, so it should work.
Just take a look at the LibreOffice entries, they have something like “libreoffice --base %U” as command.
What ended up working in the menu editor was to disable to command line, set the working path, and use kstart ./matlab -desktop as the Command.