Installing MATLAB: Difference between revisions
Init MATLAB |
fixup |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
=== Install with MATLAB package manager === | === Install with MATLAB package manager === | ||
Replace `/usr/local/MATLAB/` with | Replace `/usr/local/MATLAB/` with whatever you want, it may make more sense to have it in your home directory. | ||
It needs to run with permission to edit files for authorization, if it is not owned by you run: | It needs to run with permission to edit files for authorization, if it is not owned by you run: <syntaxhighlight lang="sh">chmod -R 777 /usr/local/MATLAB/</syntaxhighlight> | ||
==== Install your preferred release ==== | ==== Install your preferred release ==== | ||
you can make a new folder for each and have multiple or just use a single folder and overwrite your previous install | you can make a new folder for each and have multiple or just use a single folder and overwrite your previous install | ||
<syntaxhighlight lang="sh">mpm install --release=R2025b --destination=/usr/local/MATLAB/R2025b MATLAB Simulink Control_System_Toolbox</syntaxhighlight> | |||
==== Authenticate ==== | |||
Include the lib after ':' if you needed an older version of a library like gnutls, you may also have to run this with bash as it specifies /bin/sh while using bashisms.<syntaxhighlight lang="sh"> | |||
LD_LIBRARY_PATH='/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/' /usr/local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer.sh | |||
</syntaxhighlight> | |||
=== General install tips === | === General install tips === | ||
Line 16: | Line 21: | ||
If you are running a bleeding edge distro you will have to downgrade gnutls to 3.8.9, can be found here for arch: https://archive.archlinux.org/packages/g/gnutls/gnutls-3.8.9-1-x86_64.pkg.tar.zst | If you are running a bleeding edge distro you will have to downgrade gnutls to 3.8.9, can be found here for arch: https://archive.archlinux.org/packages/g/gnutls/gnutls-3.8.9-1-x86_64.pkg.tar.zst | ||
Simply unzip all the *.so.[number] files into some sort of library directory specifically for MATLAB to preload it when launching MATLAB, something like `/usr/local/MATLAB/R2025b/lib` will do. Then in your .desktop file prepend | Simply unzip all the *.so.[number] files into some sort of library directory specifically for MATLAB to preload it when launching MATLAB, something like `/usr/local/MATLAB/R2025b/lib` will do. Then in your .desktop file prepend <syntaxhighlight lang="sh">LD_LIBRARY_PATH=/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/</syntaxhighlight> | ||
==== .desktop file tips ==== | ==== .desktop file tips ==== | ||
Copy the desktop file to your personal desktop file area to customize how it launches | Copy the desktop file to your personal desktop file area to customize how it launches | ||
<syntaxhighlight lang="sh">sudo cp /usr/share/applications/matlab.desktop ~/.local/share/applications/matlab.desktop && sudo chown [user] [user] ~/.local/share/applications/matlab.desktop</syntaxhighlight> | |||
Change the exec line to keep existing preloads, directly call the file, and have the startup folder preference be respected: | |||
<syntaxhighlight lang="sh" line="1">Exec=env 'LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so' LD_LIBRARY_PATH=/usr/lib/dri/ /usr/local/MATLAB/R2025b/bin/matlab -desktop -useStartupFolderPref</syntaxhighlight> | |||
== UI size == | |||
In some 2025 release the ui zoom was disabled, you can set it in the MATLAB command window with: | |||
<syntaxhighlight lang="matlab">settings().matlab.desktop.Zoom.PersonalValue=150</syntaxhighlight> | |||
if you want to tab through the possible settings you can change run: | |||
<syntaxhighlight lang="matlab"> | |||
s=settings | |||
s.[ctrl+space/tab]</syntaxhighlight> |
Latest revision as of 17:06, 14 October 2025
Install MATLAB:[edit | edit source]
Install with MATLAB package manager[edit | edit source]
Replace `/usr/local/MATLAB/` with whatever you want, it may make more sense to have it in your home directory.
It needs to run with permission to edit files for authorization, if it is not owned by you run:
chmod -R 777 /usr/local/MATLAB/
Install your preferred release[edit | edit source]
you can make a new folder for each and have multiple or just use a single folder and overwrite your previous install
mpm install --release=R2025b --destination=/usr/local/MATLAB/R2025b MATLAB Simulink Control_System_Toolbox
Authenticate[edit | edit source]
Include the lib after ':' if you needed an older version of a library like gnutls, you may also have to run this with bash as it specifies /bin/sh while using bashisms.
LD_LIBRARY_PATH='/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/' /usr/local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer.sh
General install tips[edit | edit source]
gnutls breaking changes[edit | edit source]
If you are running a bleeding edge distro you will have to downgrade gnutls to 3.8.9, can be found here for arch: https://archive.archlinux.org/packages/g/gnutls/gnutls-3.8.9-1-x86_64.pkg.tar.zst
Simply unzip all the *.so.[number] files into some sort of library directory specifically for MATLAB to preload it when launching MATLAB, something like `/usr/local/MATLAB/R2025b/lib` will do. Then in your .desktop file prepend
LD_LIBRARY_PATH=/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/
.desktop file tips[edit | edit source]
Copy the desktop file to your personal desktop file area to customize how it launches
sudo cp /usr/share/applications/matlab.desktop ~/.local/share/applications/matlab.desktop && sudo chown [user] [user] ~/.local/share/applications/matlab.desktop
Change the exec line to keep existing preloads, directly call the file, and have the startup folder preference be respected:
Exec=env 'LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so' LD_LIBRARY_PATH=/usr/lib/dri/ /usr/local/MATLAB/R2025b/bin/matlab -desktop -useStartupFolderPref
UI size[edit | edit source]
In some 2025 release the ui zoom was disabled, you can set it in the MATLAB command window with:
settings().matlab.desktop.Zoom.PersonalValue=150
if you want to tab through the possible settings you can change run:
s=settings
s.[ctrl+space/tab]