Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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/
share|improve this answer
    
The script is executable: -rwxr-xr-x 1 root root 35 2011-06-24 11:30 /usr/bin/launchMatlab –  texnic Jul 9 '11 at 17:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.