Clear Filters
Clear Filters

Why is MATLAB unable to run the MATLABWindow application on Linux?

339 views (last 30 days)
Why is MATLAB unable to run the MATLABWindow application on Linux, with the following warning?
>> simulink
Warning: MATLABWindow application failed to launch. Unable to launch the MATLABWindow application

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Oct 2023
Edited: MathWorks Support Team on 25 Oct 2023
There are a few things that can cause MATLABWindow to not open correctly.


1. Missing Libraries
Under normal conditions, supported Linux distributions should have all the libraries needed in the Operating System to run MATLAB and the installer. However, for a variety of reasons, some may be missing on your computer. To ensure that you have the correct libraries installed with your supported Linux distribution, navigate into the folder the installer is in, then the "bin" folder, and then the "glnxa64" folder. In this folder, there is an application called MATLABWindow. If you launch this program with ./MATLABWindow and you are missing libraries, you will see those missing libraries appear in the error message. MATLAB and its installer ships some libraries needed by MATLABWindow. To use these, set the LD_LIBRARY_PATH environment variable using the following command in the Linux Terminal:
export LD_LIBRARY_PATH=/usr/local/MATLAB/R2023b/cefclient/sys/os/glnxa64
After setting this, run MATLABWindow again. If you still see errors about missing libraries, then use your Linux distribution's package manager to install the missing libraries (such as apt, dnf, yum, or pacman.) If you are unsure what packages include the library you are missing, use your distribution's package search to find a package that contains the library you are missing. For example, you can use Ubuntu's package search site to search for the appropriate package, and then install it with "sudo apt install <package name>". There is not a comprehensive list of every library MATLAB needs in order to function on Linux. Another approach you can take is setting up an environment variable that points to a specific library that MATLAB ships with, instead of the Operating System's. An example would be to run this command in the Linux Terminal to setup an environment variable if the library "" is causing issues:
export LD_PRELOAD="/home/local/MATLAB/R2020b/bin/glnxa64/".
The difference between LD_PRELOAD and LD_LIBRARY_PATH is that the LD_PRELOAD points to a specific library file, while LD_LIBRARY_PATH searches a directory for various library files.
There is no exhaustive list of the libraries that MATLAB depends on from the Operating System nor which ones can be substituted with the ones that MATLAB ships with.


2. Permissions
Make sure the user running MATLAB has permissions to access and execute folders and files from MATLAB's installation directory.


3. No graphical environment
MATLABWindow is a GUI application and requires a graphical environment such as X11 or Wayland. Display forwarding is required if the computer is being remotely accessed. If you need to do a command-line only installation of MATLAB, either do a silent installation or use MATLAB Package Manager.


MATLAB Package Manager


Install MATLAB Using Silent Installation

Sign in to comment.

More Answers (1)

József Mózer
József Mózer on 8 Jan 2021
I had an error that was not documented on support pages at all, but was very similar to this one. It propped up after I solved issue number 2 in this thread when attempting to launch Simulink.
This solution worked for me on R2019b, but since the issue is consistent it should work with all recent MATLAB releases as well as all Linux distributions. As it turns out, there has been a problem with the Add-on Manager of MATLAB for a while now, causing these issues. Here's the solution in case you don't want to read the details. Also it is uncessary to redirect the symlinks as described on the Wiki, it is enough to exclude them from the matlabroot folder so MATLAB will use system-defaults.
Here's the process, run commands as root when prompted:
cd /usr/local/MATLAB/R2019b/cefclient/sys/so/glnxa64 # default location for this
mkdir exclude
Now enter the commands to remove the symlinks causing the errors.
mv* exclude
mv* exclude
mv* exclude
mv* exclude
mv* exclude
Your problem should be solved. This shouldn't break anything either, since more up-to-date system defaults exist for these libs. You should also make a README file, so you know what you did and why in case you need to come back a year later or something.
I would also like to state, that I am severely disappointed in MATLAB and Mathworks. Providing a .zip file for installation on systems with very well made package management is dumb and annoying. Shipping an expensive piece of commercial software on an operating system claiming it works, while it needs workarounds is straight up outrageous.


Find more on Introduction to Installation and Licensing in Help Center and File Exchange


No tags entered yet.




Community Treasure Hunt

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

Start Hunting!