Why is Simulink displaying correctly only as root user?

조회 수: 2 (최근 30일)
Antoine Dupont
Antoine Dupont 2024년 2월 6일
편집: Antoine Dupont 2024년 2월 20일
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.

답변 (1개)

Gojo
Gojo 2024년 2월 18일
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
Antoine Dupont
Antoine Dupont 2024년 2월 20일
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!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by