Thread Subject: desktop layout problem

Subject: desktop layout problem

From: Pinpress

Date: 20 Nov, 2008 14:27:02

Message: 1 of 12

Hi all,

The short story: Matlab desktop layout only saves the position and size of the Editor, but not the command window, workspace, command history, etc.

The long story: I am sure some of you also have this similar problem when working with Matlab sometimes at
the computer where Matlab is installed while sometimes remotely by connecting to the computer remotely using remote desktop (on XP
or Vista, at least). I always set my preferred Matlab desktop layout to be that the editor occupies the left
half of the screen, while the command window, command history, and workspace etc. occupy the right half of the screen.
Therefore, my Matlab would occupy the entire screen when I am working at the desktop computer where it is installed.
I save this layout to something like: "fullScreen". The problem is that if I work remotely (e.g., at home) using
my laptop to connect to the computer remotely, I do not get the same size of the screen. If I
want to have s similar layout (i.e., editor to occupy the left side while the rest on the right), I
could adjust the windows until I am happy and then, save the layout as "fullLaptopScreen". The problem is that, when
I am either at the desktop or at my laptop and when I choose the appropriate layout, only the editor
is configured the correct position and size, but not the command window etc. This is really annoying as I need
to switch between computer rather frequently.

Anyone has any suggestions/recommendations how to properly use layout manager to make my life easier? thanks.

Subject: desktop layout problem

From: Peter Muellers

Date: 20 Nov, 2008 17:10:15

Message: 2 of 12

This problem arises because saved layouts don't include the size and
location of the main desktop frame. They include the arrangement of
components within the frame and the size and location of undocked frames.
In the future we might consider providing an option in the save dialog to
include the main frame size and location. In the meantime there are a
couple of ways you can achieve the behavior you desire.

1. Dock the Editor, drag it to the left side of the main desktop frame and
size it to occupy half of the frame. Save this layout. When you restore
this layout the editor will occupy half of the desktop frame and the other
components will appear within the other half.

2. This approach is a bit more involved but avoids the need to dock the
editor. It takes advantage of the fact that the session layout file that is
saved automatically on exit does include the main desktop frame size and
location. Arrange the undocked Editor and main desktop frame the way you
want them. Issue the MATLAB prefdir command and take note of the
preferences directory location. Exit MATLAB. In the preferences directory
make a copy of the file "MATLABDesktop.xml". Rename the copy to
fullScreenMATLABLayout.xml or fullLaptopScreenMATLABLayout.xml as
appropriate. The next time you start MATLAB corresponding entries (named
fullScreen or fullLaptopScreen) will appear under the Desktop->Desktop
Layout menu. Selecting one of these entries will restore the main desktop
frame's size and location as well as the Editor's.

Peter Muellers
The MathWorks, Inc.


"Pinpress" <nothing@nothing.edu> wrote in message
news:gg3s3m$2il$1@fred.mathworks.com...
> Hi all,
>
> The short story: Matlab desktop layout only saves the position and size of
> the Editor, but not the command window, workspace, command history, etc.
>
> The long story: I am sure some of you also have this similar problem when
> working with Matlab sometimes at
> the computer where Matlab is installed while sometimes remotely by
> connecting to the computer remotely using remote desktop (on XP
> or Vista, at least). I always set my preferred Matlab desktop layout to be
> that the editor occupies the left
> half of the screen, while the command window, command history, and
> workspace etc. occupy the right half of the screen.
> Therefore, my Matlab would occupy the entire screen when I am working at
> the desktop computer where it is installed.
> I save this layout to something like: "fullScreen". The problem is that if
> I work remotely (e.g., at home) using
> my laptop to connect to the computer remotely, I do not get the same size
> of the screen. If I
> want to have s similar layout (i.e., editor to occupy the left side while
> the rest on the right), I
> could adjust the windows until I am happy and then, save the layout as
> "fullLaptopScreen". The problem is that, when
> I am either at the desktop or at my laptop and when I choose the
> appropriate layout, only the editor
> is configured the correct position and size, but not the command window
> etc. This is really annoying as I need
> to switch between computer rather frequently.
>
> Anyone has any suggestions/recommendations how to properly use layout
> manager to make my life easier? thanks.

Subject: desktop layout problem

From: Pinpress

Date: 20 Nov, 2008 22:26:02

Message: 3 of 12

I like the second method. So far it seems to be working. thanks.

Subject: desktop layout problem

From: Pinpress

Date: 21 Nov, 2008 13:59:02

Message: 4 of 12

Hi Peter,

It still seems not entirely working -- I followed the second method, and when I tried to use DesktopLayout in my office after Matlab was used remotely using LaptopLayout, I can see that the editor was positioned and sized correctly. The main window was sized correctly, but not positioned all the way to the right. It was somehow still in the middle. I wonder if there is any further fix to this. By the way, I am using R2008b. thanks.

Pinpress

"Peter Muellers" <Peter.Muellers@mathworks.com> wrote in message <gg45lq$5oc$1@fred.mathworks.com>...
> This problem arises because saved layouts don't include the size and
> location of the main desktop frame. They include the arrangement of
> components within the frame and the size and location of undocked frames.
> In the future we might consider providing an option in the save dialog to
> include the main frame size and location. In the meantime there are a
> couple of ways you can achieve the behavior you desire.
>
> 1. Dock the Editor, drag it to the left side of the main desktop frame and
> size it to occupy half of the frame. Save this layout. When you restore
> this layout the editor will occupy half of the desktop frame and the other
> components will appear within the other half.
>
> 2. This approach is a bit more involved but avoids the need to dock the
> editor. It takes advantage of the fact that the session layout file that is
> saved automatically on exit does include the main desktop frame size and
> location. Arrange the undocked Editor and main desktop frame the way you
> want them. Issue the MATLAB prefdir command and take note of the
> preferences directory location. Exit MATLAB. In the preferences directory
> make a copy of the file "MATLABDesktop.xml". Rename the copy to
> fullScreenMATLABLayout.xml or fullLaptopScreenMATLABLayout.xml as
> appropriate. The next time you start MATLAB corresponding entries (named
> fullScreen or fullLaptopScreen) will appear under the Desktop->Desktop
> Layout menu. Selecting one of these entries will restore the main desktop
> frame's size and location as well as the Editor's.
>
> Peter Muellers
> The MathWorks, Inc.
>
>
> "Pinpress" <nothing@nothing.edu> wrote in message
> news:gg3s3m$2il$1@fred.mathworks.com...
> > Hi all,
> >
> > The short story: Matlab desktop layout only saves the position and size of
> > the Editor, but not the command window, workspace, command history, etc.
> >
> > The long story: I am sure some of you also have this similar problem when
> > working with Matlab sometimes at
> > the computer where Matlab is installed while sometimes remotely by
> > connecting to the computer remotely using remote desktop (on XP
> > or Vista, at least). I always set my preferred Matlab desktop layout to be
> > that the editor occupies the left
> > half of the screen, while the command window, command history, and
> > workspace etc. occupy the right half of the screen.
> > Therefore, my Matlab would occupy the entire screen when I am working at
> > the desktop computer where it is installed.
> > I save this layout to something like: "fullScreen". The problem is that if
> > I work remotely (e.g., at home) using
> > my laptop to connect to the computer remotely, I do not get the same size
> > of the screen. If I
> > want to have s similar layout (i.e., editor to occupy the left side while
> > the rest on the right), I
> > could adjust the windows until I am happy and then, save the layout as
> > "fullLaptopScreen". The problem is that, when
> > I am either at the desktop or at my laptop and when I choose the
> > appropriate layout, only the editor
> > is configured the correct position and size, but not the command window
> > etc. This is really annoying as I need
> > to switch between computer rather frequently.
> >
> > Anyone has any suggestions/recommendations how to properly use layout
> > manager to make my life easier? thanks.

Subject: desktop layout problem

From: Rune Allnor

Date: 21 Nov, 2008 14:15:44

Message: 5 of 12

On 20 Nov, 18:10, "Peter Muellers" <Peter.Muell...@mathworks.com>
wrote:
> This problem arises because saved layouts don't include the size and
> location of the main desktop frame. =A0They include the arrangement of
> components within the frame and the size and location of undocked frames.
> In the future we might consider providing an option in the save dialog to
> include the main frame size and location. =A0

I would suggest you prioritize this issue, and make an effort
to improve the ergonomics for the individual users.

For all matlab users, there is the question of preserving
preferences and settings over updates between releases.
With a twice-per year release rate, the newly installed
matlab version should just scan and adopt pre-existing
user settings, if any.

Desktop settings can already be saved by name. It ought to
be possible to select a preferred desktop setting by name
from startup.m.

Lots of users (like me) travel form site to site and
use a matlab lisences made available by others. It would
be very conveient if I could save my preferred matlab
desktop configuration to some file on a USB stick, so
I can load it on the new site. This way I can always
work in my familiar desktop environment and window
configuration.

The local 'work' directory should be located in the user's
"My Directory" folder (or similar), not under a release-
specific folder (this may have been changed since R2006a,
which is what I use.)

Just some ideas.

Rune

Subject: desktop layout problem

From: Pinpress

Date: 21 Nov, 2008 14:40:19

Message: 6 of 12

I agree with Rune. Also I would prefer that there is way somewhere to start up matlab with a default current directory other than :

C:\Users\LOGINNAME\Documents\MATLAB

which is the case now. I always have my entire work directories (not just matlab) in logical drive D. So every time I start up Matlab, the first thing for me to do is to click the current directory drop down list and change it to something else.

It may seem funny, but I have resisted upgrading to Matlab R2008b and still using R2006b for a long time, just because the newer release had a default directory on C.

Rune Allnor <allnor@tele.ntnu.no> wrote in message <829d65b1-7cbb-42c7-81ee-
>
> The local 'work' directory should be located in the user's
> "My Directory" folder (or similar), not under a release-
> specific folder (this may have been changed since R2006a,
> which is what I use.)
>
> Just some ideas.
>
> Rune

Subject: desktop layout problem

From: Peter Muellers

Date: 21 Nov, 2008 16:58:32

Message: 7 of 12

Rune,

Regarding the following "... the newly installed matlab version should just
scan and adopt pre-existing user settings, if any." This is generally what
MATLAB does. Have you seen otherwise during a recent upgrade?

Your suggestions regarding the need for settings portability are well taken.

The "work" directory has been changed to use the proper location under
Windows (I believe as of R2007b).

Thanks for the suggestions and insight into your usage of MATLAB.

Peter

"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:829d65b1-7cbb-42c7-81ee-715c73358d0c@j39g2000yqn.googlegroups.com...
On 20 Nov, 18:10, "Peter Muellers" <Peter.Muell...@mathworks.com>
wrote:
> This problem arises because saved layouts don't include the size and
> location of the main desktop frame. They include the arrangement of
> components within the frame and the size and location of undocked frames.
> In the future we might consider providing an option in the save dialog to
> include the main frame size and location.

I would suggest you prioritize this issue, and make an effort
to improve the ergonomics for the individual users.

For all matlab users, there is the question of preserving
preferences and settings over updates between releases.
With a twice-per year release rate, the newly installed
matlab version should just scan and adopt pre-existing
user settings, if any.

Desktop settings can already be saved by name. It ought to
be possible to select a preferred desktop setting by name
from startup.m.

Lots of users (like me) travel form site to site and
use a matlab lisences made available by others. It would
be very conveient if I could save my preferred matlab
desktop configuration to some file on a USB stick, so
I can load it on the new site. This way I can always
work in my familiar desktop environment and window
configuration.

The local 'work' directory should be located in the user's
"My Directory" folder (or similar), not under a release-
specific folder (this may have been changed since R2006a,
which is what I use.)

Just some ideas.

Rune

Subject: desktop layout problem

From: Rune Allnor

Date: 21 Nov, 2008 18:51:45

Message: 8 of 12

On 21 Nov, 17:58, "Peter Muellers" <Peter.Muell...@mathworks.com>
wrote:
> Rune,
>
> Regarding the following "... the newly installed matlab version should ju=
st
> scan and adopt pre-existing user settings, if any." =A0This is generally =
what
> MATLAB does. =A0Have you seen otherwise during a recent upgrade?

My last upgrade was to R2006a, so no, I don't have any
recent experience.

Rune

Subject: desktop layout problem

From: Peter Muellers

Date: 21 Nov, 2008 19:32:21

Message: 9 of 12

If I understand your usage correctly, "DesktopLayout" is the renamed xml
file from a previous session on your office computer. You startup MATLAB in
your office, having most recently run it remotely from a laptop. On startup
the desktop restores the layout appropriate for the laptop. You then choose
DesktopLayout but it doesn't correctly restore the main frame's location.
Do I have this right?

I tried the equivalent steps here and didn't observe any problem. If you
send me a screen shot of your desktop after the failed restore plus the
DeskopLayoutMATLABLayout.xml file I can try to diagnose the problem.

Peter

"Pinpress" <nothing@nothing.edu> wrote in message
news:gg6er6$bd5$1@fred.mathworks.com...
> Hi Peter,
>
> It still seems not entirely working -- I followed the second method, and
> when I tried to use DesktopLayout in my office after Matlab was used
> remotely using LaptopLayout, I can see that the editor was positioned and
> sized correctly. The main window was sized correctly, but not positioned
> all the way to the right. It was somehow still in the middle. I wonder if
> there is any further fix to this. By the way, I am using R2008b. thanks.
>
> Pinpress
>
> "Peter Muellers" <Peter.Muellers@mathworks.com> wrote in message
> <gg45lq$5oc$1@fred.mathworks.com>...
>> This problem arises because saved layouts don't include the size and
>> location of the main desktop frame. They include the arrangement of
>> components within the frame and the size and location of undocked frames.
>> In the future we might consider providing an option in the save dialog to
>> include the main frame size and location. In the meantime there are a
>> couple of ways you can achieve the behavior you desire.
>>
>> 1. Dock the Editor, drag it to the left side of the main desktop frame
>> and
>> size it to occupy half of the frame. Save this layout. When you restore
>> this layout the editor will occupy half of the desktop frame and the
>> other
>> components will appear within the other half.
>>
>> 2. This approach is a bit more involved but avoids the need to dock the
>> editor. It takes advantage of the fact that the session layout file that
>> is
>> saved automatically on exit does include the main desktop frame size and
>> location. Arrange the undocked Editor and main desktop frame the way you
>> want them. Issue the MATLAB prefdir command and take note of the
>> preferences directory location. Exit MATLAB. In the preferences
>> directory
>> make a copy of the file "MATLABDesktop.xml". Rename the copy to
>> fullScreenMATLABLayout.xml or fullLaptopScreenMATLABLayout.xml as
>> appropriate. The next time you start MATLAB corresponding entries (named
>> fullScreen or fullLaptopScreen) will appear under the Desktop->Desktop
>> Layout menu. Selecting one of these entries will restore the main
>> desktop
>> frame's size and location as well as the Editor's.
>>
>> Peter Muellers
>> The MathWorks, Inc.
>>
>>
>> "Pinpress" <nothing@nothing.edu> wrote in message
>> news:gg3s3m$2il$1@fred.mathworks.com...
>> > Hi all,
>> >
>> > The short story: Matlab desktop layout only saves the position and size
>> > of
>> > the Editor, but not the command window, workspace, command history,
>> > etc.
>> >
>> > The long story: I am sure some of you also have this similar problem
>> > when
>> > working with Matlab sometimes at
>> > the computer where Matlab is installed while sometimes remotely by
>> > connecting to the computer remotely using remote desktop (on XP
>> > or Vista, at least). I always set my preferred Matlab desktop layout to
>> > be
>> > that the editor occupies the left
>> > half of the screen, while the command window, command history, and
>> > workspace etc. occupy the right half of the screen.
>> > Therefore, my Matlab would occupy the entire screen when I am working
>> > at
>> > the desktop computer where it is installed.
>> > I save this layout to something like: "fullScreen". The problem is that
>> > if
>> > I work remotely (e.g., at home) using
>> > my laptop to connect to the computer remotely, I do not get the same
>> > size
>> > of the screen. If I
>> > want to have s similar layout (i.e., editor to occupy the left side
>> > while
>> > the rest on the right), I
>> > could adjust the windows until I am happy and then, save the layout as
>> > "fullLaptopScreen". The problem is that, when
>> > I am either at the desktop or at my laptop and when I choose the
>> > appropriate layout, only the editor
>> > is configured the correct position and size, but not the command window
>> > etc. This is really annoying as I need
>> > to switch between computer rather frequently.
>> >
>> > Anyone has any suggestions/recommendations how to properly use layout
>> > manager to make my life easier? thanks.
>

Subject: desktop layout problem

From: Dan Haeg

Date: 21 Nov, 2008 23:49:01

Message: 10 of 12

"Pinpress" <nothing@nothing.edu> wrote in message <gg6h8j$noq$1@fred.mathworks.com>...
> I agree with Rune. Also I would prefer that there is way somewhere to start up matlab with a default current directory other than :
>
> C:\Users\LOGINNAME\Documents\MATLAB
>


I'm using windows xp and matlab 2008a. On my matlab icon properties I set the start in field to "D:\MATLAB M-files" this works for me. If you prefer you can crate a startup.m on your matlab path and cd to your favorite directory.

Dan

Subject: desktop layout problem

From: Pinpress

Date: 24 Nov, 2008 13:33:01

Message: 11 of 12

Hi Peter,

Yes, you understood it correctly. I tried to repeat the process, but *this* time both editor and main window were sized and positioned correctly. However, I have a new problem (actually, it also happened last time as well). All the opened files in the editor in the last session were opened a second time in the editor. For example, if I had files A, B and C opened remotely. Now I come to my office and I chose "DesktopLayout", I then would have A, B, C, A, B and C opened in my editor.

Let me email you part of the screen shot as well as the .xml file. Please check your email. thanks.

"Peter Muellers" <Peter.Muellers@mathworks.com> wrote in message <gg72c9$ero$1@fred.mathworks.com>...
> If I understand your usage correctly, "DesktopLayout" is the renamed xml
> file from a previous session on your office computer. You startup MATLAB in
> your office, having most recently run it remotely from a laptop. On startup
> the desktop restores the layout appropriate for the laptop. You then choose
> DesktopLayout but it doesn't correctly restore the main frame's location.
> Do I have this right?
>
> I tried the equivalent steps here and didn't observe any problem. If you
> send me a screen shot of your desktop after the failed restore plus the
> DeskopLayoutMATLABLayout.xml file I can try to diagnose the problem.
>
> Peter
>

Subject: desktop layout problem

From: Pinpress

Date: 24 Nov, 2008 13:34:02

Message: 12 of 12

Hi Dan,

Thanks -- I knew about the "startup.m" method, but not the one changing the icon property. By the way, it worked very well on my Vista 64-bit.

"Dan Haeg" <haegd@msoe.edu> wrote in message <gg7hdd$64s$1@fred.mathworks.com>...
> "Pinpress" <nothing@nothing.edu> wrote in message <gg6h8j$noq$1@fred.mathworks.com>...
> > I agree with Rune. Also I would prefer that there is way somewhere to start up matlab with a default current directory other than :
> >
> > C:\Users\LOGINNAME\Documents\MATLAB
> >
>
>
> I'm using windows xp and matlab 2008a. On my matlab icon properties I set the start in field to "D:\MATLAB M-files" this works for me. If you prefer you can crate a startup.m on your matlab path and cd to your favorite directory.
>
> Dan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
desktop layout Pinpress 20 Nov, 2008 09:30:22
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com