Why is Simulink displaying correctly only as root user?

3 visualizzazioni (ultimi 30 giorni)
I have installed Matlab R2023b on Kubuntu 22.04.
When I try to use simulink after having started Matlab, it opens with a dark layout and with a very low resolution. But when I do it as root user, I can use Simulink with high resolution, and it displays well. Do you have an idea of what is happening?
I should also include that Matlab itself is displaying well in both cases.

Risposte (1)

Gojo
Gojo il 18 Feb 2024
Hi Antoine,
It seems that Simulink is displaying dark layout with incorrect resolution. However, the same problem does not arise in Simulink when launched as a root user.
The reason for such an unexpected behaviour would be due to some user preferences that needs to be changed. The simplest way to resolve this issue is to launch Simulink as a root user. If sudo privileges are denied for some users, you can try referring to the following MATLAB Answer that describes how MATLAB supports high DPI screens on Linux:
You can also create a script for setting the display scaling as follows:
>> s = settings;s.matlab.desktop.DisplayScaleFactor;
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1;
>> quit;
Then you can use the MATLAB startup option '-r' to run this script by typing the following in the terminal:
matlab -r "<scriptname>"
This will set the display scaling and quit MATLAB. After MATLAB has quit, you can then restart again from the terminal: 
matlab
The following documentation page provides more details on the startup option ‘-r’: https://www.mathworks.com/help/matlab/ref/matlablinux.html#buknt9_-3
You may also have a look at the following MATLAB Answer detailing the scaling issue in Windows:
I hope this helps!
  1 Commento
Antoine Dupont
Antoine Dupont il 20 Feb 2024
Hello Shubham,
Thank you for your answer. Unfortunately, using the matlab scaling parameter is not an option for me, as it changes the scaling of MATLAB itself, which I don't want as it is already set well.
I could open matlab each time as root, but it feels like it is not normal having to do that. So I would rather wait for an other solution.
Have a great day!

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by