Modified settings (PersonalValue) not persistent across sessions (display scaling)

10 views (last 30 days)
I want to display Matlab on a high resolution 4K screen. I am using Matlab 2019b and my operating system is Linux Mint 18.3. With the default settings, the fonts and the icons are tiny, as described in question https://ch.mathworks.com/matlabcentral/answers/406956-does-matlab-support-high-dpi-screens-on-linux. I have changed the system settings of my OS (fonts and display scaling), which a lot of other programs obey, but Matlab does not.
I have tried to solve the issue using the answer
i.e.,
>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5
However, the change to
s.matlab.desktop.DisplayScaleFactor.PersonalValue
does not persist across sessions: After restarting Matlab, PersonalValue 's value is undefined again.
I read in https://ch.mathworks.com/help/matlab/matlab_external/access-and-modify-settings.html that changes to PersonalValue are saved to the preferences folder, which in my case (according to prefdir) is ~/.matlab/R2019b. I have read and write access to this folder.
How can I change the DisplayScaleFactor permanently? Why are the settings not saved?
(Similarly, changing the Matlab font sizes in Preferences -> Fonts is not persistent for the Desktop code font; however for the Desktop text font, it is.)

Accepted Answer

n_luethen
n_luethen on 18 Mar 2020
Thank you @Harsha Priya Daggubati!
Renaming my preference directory to R2019b_old, as suggested in the link that you provided, and letting Matlab create a fresh one solved the problem! Now my preferences are saved across sessions and the display scaling works.

More Answers (2)

Harsha Priya Daggubati
Harsha Priya Daggubati on 18 Mar 2020
Hi,
One possible workaround for your problem would be to use 'startup.m' and run the commands to change the DisplayScaleFactor. To identify the startup folder, type pwd at the command line immediately after starting MATLAB and before typing any other commands. Refer to the following link for more detailed instructions.
Hope this helps!
  1 Comment
n_luethen
n_luethen on 18 Mar 2020
Hi,
thanks a lot for your answer! Unfortunately, Matlab apparently needs to be restarted for the rescaling to take effect: the message it is displaying when I change the DisplayScaleFactor, whether in startup.m or in the command window, is MATLAB must be restarted in order for the scale change to take effect. So putting the commands in startup.m is too late.
I still tried it, and there is no visible effect.
Is there any reason why my Matlab installation would not save PersonalValues or certain preferences?

Sign in to comment.


Harsha Priya Daggubati
Harsha Priya Daggubati on 18 Mar 2020
Hi,
I think it is advisable to restart MATLAB whenever the preferences are changed. I could assume the above based on the discussion in the following thread:

Categories

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

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!