Set MATLAB as default for .m files in Ubuntu without opening an empty editor

4 vues (au cours des 30 derniers jours)
Paul Wright
Paul Wright le 6 Avr 2021
According to the previous thread, MATLAB can be made to open .m files by default in Ubuntu by editing the matlab.desktop file (usually in /usr/share/applications) and changing:
Exec=matlab -desktop
to
Exec=matlab -desktop -r "edit %f"
This has the side effect that opening MATLAB from its icon causes an empty editor window to be open. Can anyone advise how to avoid this? It looks like using X-Ayatana-Desktop-Shortcuts may help, but I cannot figure out how to make just opening the command window the default and opening the editor to happen only if a file is specified.

Réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by