Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to make a program launchable from krunner or the application launcher?

  1. #1

    Default How to make a program launchable from krunner or the application launcher?

    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.

    What would be the best way to do this?

    Thanks

  2. #2

    Default AW: How to make a program launchable from krunner or the application launcher?

    Quote Originally Posted by 8ofspades View Post
    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.

    What would be the best way to do this?
    You should be able to run it with krunner just the same as from the command line.

    For the application launcher, just right-click on the launcher's icon and select "Edit menu entries..." and create an entry.

  3. #3

    Default Re: How to make a program launchable from krunner or the application launcher?

    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.

  4. #4

    Default Re: How to make a program launchable from krunner or the application launcher?

    Quote Originally Posted by 8ofspades View Post
    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.

    If there's an entry in the menu, you will also be able to run that with krunner.
    Last edited by wolfi323; 07-Jun-2014 at 11:27.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: How to make a program launchable from krunner or the application launcher?

    Quote Originally Posted by 8ofspades View Post
    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.
    And of course use an absolute path and not a relative like ./
    Relative to what is that when started from an icon? You are not in a shell, thus what is the "working directory"?
    Henk van Velden

  6. #6

    Default Re: How to make a program launchable from krunner or the application launcher?

    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.

    And of course use an absolute path and not a relative like ./
    Relative to what is that when started from an icon? You are not in a shell, thus what is the "working directory"?
    I am using an absolute path, specifically /home/user/Programs/MATLAB/R2013a/bin/./matlab

  7. #7

    Default Re: How to make a program launchable from krunner or the application launcher?

    Quote Originally Posted by hcvv View Post
    And of course use an absolute path and not a relative like ./
    Relative to what is that when started from an icon? You are not in a shell, thus what is the "working directory"?
    You can specifically set the "working directory" for the entry in the menu editor as I said. That setting is on the "Advanced" tab btw.
    Thus a relative path is actually possible.

    You can even omit the "./" in that case I suppose.

    Or just select the executable that should br run in the file dialog (click on the disk symbol)...
    Last edited by wolfi323; 07-Jun-2014 at 11:39.

  8. #8

    Default Re: How to make a program launchable from krunner or the application launcher?

    You can specifically set the "working directory" for the entry in the menu editor as I said. That setting is on the "Advanced" tab btw.
    Thus a relative path is actually possible.

    You can even omit the "./" in that case I suppose.

    Or just select the executable to run in the file dialog...
    Alright, so this is what I have tried in the menu editor.

    The full path in the "Command option", result = Matlab splash screen opens, but the program itself never launches.

    work path set to /home/user/Programs/MATLAB/R2013a/bin/ and Command set to either matlab or ./matlab, result = nothing happens when launched (I saved my settings)

    full path in Run in terminal, result = launches with konsole window, still no krunner

  9. #9

    Default Re: How to make a program launchable from krunner or the application launcher?

    Quote Originally Posted by 8ofspades View Post
    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).
    Well, that's matlab's "fault" then if it only can run inside a terminal window. I don't know matlab good enough to tell you whether there's a way around that.

    You could make the konsole window start minimized or similar by creating a window rule, or try to use "kstart" to start it. (see "kstart --help" for more informations)

    I am still unable to launch it from krunner.
    You should.
    Can you run other menu entries with krunner?
    The corresponding runner jas to be enabled of course.

    Maybe krunner is just not aware yet of your changes? Try to run "kbuildsycoca4 --noincremental" and/or logout/reboot.

    I am using an absolute path, specifically /home/user/Programs/MATLAB/R2013a/bin/./matlab
    In this case you _definitely_ can omit the "./"...

  10. #10

    Default Re: How to make a program launchable from krunner or the application launcher?

    PS: by googling for "run matlab without terminal window" I found this:
    Try "matlab -desktop" to run without a terminal.
    No idea if that will work though, that's from 2007:
    https://www.mathworks.com/matlabcent..._thread/157234

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •