MATLAB icon not showing in Ubuntu while running!!

152 visualizzazioni (ultimi 30 giorni)
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 Commenti
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil il 27 Ago 2025 alle 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 il 27 Ago 2025 alle 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

Accedi per commentare.

Risposte (2)

Juergen
Juergen il 13 Giu 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 Commenti
Xiangrui Li
Xiangrui Li il 16 Giu 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 il 27 Ago 2025 alle 5:34
StartupWMClass=MATLAB R2025a Update 1

Accedi per commentare.


Alan
Alan il 27 Gen 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 Commenti
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil il 27 Gen 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 il 27 Gen 2025

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

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by