Control the window in which matlab figures appear


I’m running matlab under fvwm with multiple virtual screens. When matlab creates a figure, it shows up on the screen that I currently have in focus, interfering with whatever I’m currently trying to do. I’d like to force the figures to remain on the virtual screen where matlab was originally created, or better yet, force them to appear on a screen that I designate. Is this possible? Thanks in advance!

Have a look at the Style specifier “StartsOnPage”. Use FvwmIdent to figure out how to specify the wildcards in the Style command, probably something like “Matlab*”. So]
Style Matlab* SkipMapping StartsOnPage 0 1 0
[/code]… to start the Matlab windows on Desktop 0, Page x=1, y=0 - and to ignore at first the appearance of any such new window, i.e. not to change the focus etc.

Thanks Tronar, I’ll work on this.

Just in case anybody else is interested in this arcane topic, I did find a workaround, that would be less satisfactory than the one you propose, but still adequate.

I always open matlab with the -nodesktop option, because it uses much less overhead.

I now have the following lines in my startup.m file

noDesktop=~usejava('desktop'); if ~noDesktop set(0,'DefaultFigureWindowStyle','docked'); end;

This means that if I start matlab in the default way, i.e., with their desktop, figures stay in the place where they are created