Why is Simulink displaying correctly only as root user?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Shubham
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:
https://www.mathworks.com/matlabcentral/answers/406956-does-matlab-support-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!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!