Clear Filters
Clear Filters

How to associate .fig file in linux?

31 views (last 30 days)
Paul
Paul on 27 Feb 2012
Edited: prateek raj gautam on 16 Feb 2020
I am trying to associate .fig files with matlab in linux (Ubuntu 10.10), such that I can open them by double-clicking the file.
I'm able to open files from the command line with "matlab -r "open('filename.fig')"".
The closest I've been able to get with the "open with" configuration is to have matlab start, the figure pop up, and then matlab and the figure shutdown. This was with the file being associated with "matlab -r "open(%f)""
Any tips would be appreciated.
  1 Comment
Walter Roberson
Walter Roberson on 22 Mar 2012
Please keep in mind that if you open() a .fig file by double-clicking, you cannot run its associated code. .fig files have associated .m files and you must run the .m file in order to do initialization needed by the .fig file.

Sign in to comment.

Accepted Answer

Andreas
Andreas on 22 Mar 2012
Hi Paul!
You are on the right track.
The right command for "open with" is matlab -desktop -r "open(%f)"
Cheers Andreas

More Answers (1)

prateek raj gautam
prateek raj gautam on 19 Nov 2019
The right command for "open with" is matlab -desktop -r "open(%f)"
It worked after installing matlab-support from package manager.
but Each m file is opened in separate window. How to make it open is same running instance.
  1 Comment
prateek raj gautam
prateek raj gautam on 16 Feb 2020
Edited: prateek raj gautam on 16 Feb 2020
matlab -desktop -r "open(%f)
after installing matlab-support and configuring it properly.
any update related to not opening each file in seprate matlab window?

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!