MATLAB icon not showing in Ubuntu while running!!

조회 수: 162 (최근 30일)
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil 2025년 1월 24일
편집: Sreejith Thazhathe Veetil 2025년 9월 2일 17:50
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
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil 2025년 8월 27일 5:38
편집: Sreejith Thazhathe Veetil 2025년 9월 2일 17:50
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: The desktop shortcut can be found out by searchig for matlab.desktop. Then edit the file. In my system, the desktop file was in the folder /usr/share/applications/
[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.
👉 To find the actual wmclass, you can run Matlab software and then press Alt+F2, and then lg, you can see wmclass in Windows tab appearing there.
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 2025년 8월 27일 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

댓글을 달려면 로그인하십시오.

답변 (2개)

Juergen
Juergen 2025년 6월 13일
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
Xiangrui Li
Xiangrui Li 2025년 6월 16일
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 2025년 8월 27일 5:34
StartupWMClass=MATLAB R2025a Update 1

댓글을 달려면 로그인하십시오.


Alan
Alan 2025년 1월 27일
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
Sreejith Thazhathe Veetil
Sreejith Thazhathe Veetil 2025년 1월 27일
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 2025년 1월 27일

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by