1

In Ubuntu, Matlab should be started with the following command: setsid matlab -desktop

Accordingly, I've created such a bash script:

#!/bin/bash
setsid matlab -desktop

and saved it as /usr/bin/launchMatlab.

Now, if I press Alt+F2, type launchMatlab and click Run or press Enter, Matlab is started. However, Gnome Do, though finds the script, only allows to open, reveal, open terminal and copy to clipboard. Execution of the script as a program is allowed.

How to make Do launch the script?

2 Answers 2

1

Use a launcher (.desktop file). To do this, right click on your desktop and click 'Create Launcher...' and fill in the details:

matlab.desktop

You can then copy it to ~/.local/share/applications and you should be able to type 'Matlab' to open it with gnome-do.

0

Make sure the script is executable.

sudo chmod +x /usr/bin/launchMatlab

On a side-note, it's better to put custom commands in /usr/local/bin rather than /usr/bin. Let the package manager rule over /usr/bin.

sudo mv /usr/bin/launchMatlab /usr/local/bin/
1
  • The script is executable: -rwxr-xr-x 1 root root 35 2011-06-24 11:30 /usr/bin/launchMatlab
    – texnic
    Jul 9, 2011 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .