Running MATLAB R2024a headless on Ubuntu 24.04 causes GUI errors
Hello,
I’ve installed MATLAB R2024a on a Ubuntu Server 24.04.3 LTS machine. My goal is to run it headlessly (without a GUI), so I try launching it with:
matlab -nodesktop -nojvm -nosplash
However, when doing this, MATLAB attempts to use a graphical interface and triggers errors related to missing graphical libraries (libXrandr, libgdk_pixbuf, libXinerama, etc.).
The error messages appear to come from a temporary ServiceHost installer located at:
~/.MathWorks/ServiceHost/<machine_name>/_tmp_MSHI_xxxxx/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost
It seems that the ServiceHost installer is trying to use GUI components, which doesn’t work in this headless server environment.
My questions are:
Is there a way to disable or bypass the ServiceHost installation when running MATLAB in headless mode?
Alternatively, is there a way to install ServiceHost in a non-GUI/headless manner so MATLAB won’t attempt to launch the graphical installer?Hello,
I’ve installed MATLAB R2024a on a Ubuntu Server 24.04.3 LTS machine. My goal is to run it headlessly (without a GUI), so I try launching it with:
matlab -nodesktop -nojvm -nosplash
However, when doing this, MATLAB attempts to use a graphical interface and triggers errors related to missing graphical libraries (libXrandr, libgdk_pixbuf, libXinerama, etc.).
The error messages appear to come from a temporary ServiceHost installer located at:
~/.MathWorks/ServiceHost/<machine_name>/_tmp_MSHI_xxxxx/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost
It seems that the ServiceHost installer is trying to use GUI components, which doesn’t work in this headless server environment.
My questions are:
Is there a way to disable or bypass the ServiceHost installation when running MATLAB in headless mode?
Alternatively, is there a way to install ServiceHost in a non-GUI/headless manner so MATLAB won’t attempt to launch the graphical installer? Hello,
I’ve installed MATLAB R2024a on a Ubuntu Server 24.04.3 LTS machine. My goal is to run it headlessly (without a GUI), so I try launching it with:
matlab -nodesktop -nojvm -nosplash
However, when doing this, MATLAB attempts to use a graphical interface and triggers errors related to missing graphical libraries (libXrandr, libgdk_pixbuf, libXinerama, etc.).
The error messages appear to come from a temporary ServiceHost installer located at:
~/.MathWorks/ServiceHost/<machine_name>/_tmp_MSHI_xxxxx/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost
It seems that the ServiceHost installer is trying to use GUI components, which doesn’t work in this headless server environment.
My questions are:
Is there a way to disable or bypass the ServiceHost installation when running MATLAB in headless mode?
Alternatively, is there a way to install ServiceHost in a non-GUI/headless manner so MATLAB won’t attempt to launch the graphical installer? installation, servicehost, linux, ubuntu, headless MATLAB Answers — New Questions









