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).




