MATLAB icon not showing in Ubuntu while running!!

148 visualizaciones (últimos 30 días)
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil el 24 de En. de 2025
Comentada: Sreejith Thazhathe Veetil el 27 de Ag. de 2025 a las 16:05
I have installed MATLAB 2022b on Ubuntu 24.04.01. I could install MATLAB, and the launcher using sudo apt-get install matlab-support, Shortcut works fine and shortcut has MATLAB icon. The MATLAB also works fine and fast.
However, I cannot see MATLAB icon on the dock (taskbar), while it is runnig, instead I can see a gear icon (like settings icon). This is very confusing while running multiple applications, there is also a chance of wrongly closing the application.
Thanks in advance.
  2 comentarios
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil el 27 de Ag. de 2025 a las 5:38
The issue occurs because the default desktop shortcut created during installation contains an incorrect entry:
StartupWMClass=MATLAB R2025a
This happens both when installing via the MATLAB installer and when using:
sudo apt-get install matlab-support
As a result, the shortcut fails to work properly. I found the solution as follows:Fix Steps
Step 1: Create a desktop shortcut using:
sudo apt-get install matlab-support
Step 2: Edit the shortcut file and update its content:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=matlab -desktop
Name=MATLAB
Icon=matlab
Categories=Development;Math;Science
Comment=Scientific computing environment
Comment[zh_CN]=科学计算环境
StartupNotify=true
StartupWMClass=MATLAB R2025a Update 1
👉 The original shortcut had the wrong value in the last line.
👉 Replace it with the correct StartupWMClass as shown above.
Step 3: Refresh desktop entries:
sudo update-desktop-database
Step 4: Log out and log back in (or restart GNOME Shell with Alt+F2, then type r).
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil el 27 de Ag. de 2025 a las 16:05

To find the actual wmclass, you can run the program and then press Alt+F2, and then lg, you can see wmclass in Windows tab appearing then

Iniciar sesión para comentar.

Respuestas (2)

Juergen
Juergen el 13 de Jun. de 2025
You need to edit your matlab.desktop file and make sure the following entry is set:
StartupWMClass=MATLAB R2025a
The matlab.desktop file is in
/home/username/.local/share/applications
Here's the full content of this file on my Ubuntu 24.04 system:
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Matlab
Comment=Matlab
Comment[de]=Matlab
Exec=matlab -desktop
Icon=path-to-your-icons/matlab_icon.png
Terminal=false
Type=Application
Categories=Office;
MimeType=text/x-bibtex;
Keywords=Matlab;
StartupWMClass=MATLAB R2025a
I found the hint to why this works here: https://itsfoss.com/ubuntu-app-icon-missing/
Good luck.
  2 comentarios
Xiangrui Li
Xiangrui Li el 16 de Jun. de 2025
I figured this out following the link. It is a little tricky.
You need to go to alt-F2, run lg, to find the EXACT wmClass for Matlab instances, and input that as the value for "StartupWMClass". For my case, the value is "MATLAB R2024b - academic use". Once the .desktop is saved, the extra gear icon is combined into the launch icon with dots underneath.
Thanks @Juergen
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil el 27 de Ag. de 2025 a las 5:34
StartupWMClass=MATLAB R2025a Update 1

Iniciar sesión para comentar.


Alan
Alan el 27 de En. de 2025
Hi Sreejith,
From what I understand, you have installed MATLAB on Ubuntu using “sudo apt-get install matlab-support” and the icon is not displaying correctly on the dock.
The first step I would recommend is to ensure that necessary system updates are installed for Ubuntu.
The next step is to reinstall MATLAB using an installer as described in the following documentation: https://www.mathworks.com/help/releases/R2022b/install/ug/install-products-with-internet-connection.html
You can download the installer form here: https://www.mathworks.com/downloads/
Make sure that you select the correct release and the “Download for Linux” option.
Here is another post worth checking out, about installing MATLAB on Ubuntu: https://www.mathworks.com/matlabcentral/answers/518584-how-do-i-install-on-ubuntu
If this problem persists after all these steps, you can contact MathWorks technical support: https://www.mathworks.com/support/contact_us.html
Regards,
Alan
  5 comentarios
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil el 27 de En. de 2025
How much is the average RAM usage for MATLAB 2024b? As per the release note, it requires minimum 8 GB and recommended 16 GB.
Alan
Alan el 27 de En. de 2025

On average it takes about 1.5 to 2 GB for me. It goes up to 5-6 GB on heavy usage.

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by