Matlab with 2 icons on the dock in linux

25 ビュー (過去 30 日間)
César Oliveira
César Oliveira 2020 年 5 月 18 日
編集済み: Juan Sebastian Barreto 2023 年 8 月 21 日
I'm using matlab on ubuntu 20.04 and I've installed the matlab-support package.
I added the matlab icon on the dock, but when I open the program other icon is created on the dock. How can I resolve this?

回答 (1 件)

Juan Sebastian Barreto
Juan Sebastian Barreto 2021 年 4 月 16 日
編集済み: Walter Roberson 2021 年 4 月 16 日
Hello
He had the same problem, in many places I saw that I had to add this StartupWMClass=com-mathworks-util-PostVMInit en /usr/share/applications/matlab.desktop but it did not help me, finally what I did was add that line but different
StartupWMClass=MATLAB R2021a - academic use
take the value from what appears at the top when opening matlab
but one thing was missing to select the correct image of the icon, since generally one finds that they download it from the internet but this generates an error so it is better to choose the one that comes in the download files, since it seems that two icons appear because there are errors in the matlab.desktop that makes it impossible to open from there
Icon=/usr/local/MATLAB/R2021A/bin/glnxa64/cef_resources/matlab_icon.png
Finally I leave the complete matlab.desktop file
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/usr/local/MATLAB/R2021A/bin/glnxa64/cef_resources/matlab_icon.png
Name=MATLAB R2021a
Comment=Start MATLAB - The Language of Technical Computing
#Uncomment the following line and comment the line after to
#force matlab to use the 32 bits architecture
#Exec=matlab -arch=glnx86 -desktop
Exec=matlab -desktop
Terminal=false
Categories=Development;
StartupNotify=true
#Uncomment the following line if you've got several matlab icons in the launcher
StartupWMClass=MATLAB R2021a - academic use
  3 件のコメント
Juan Sebastian Barreto
Juan Sebastian Barreto 2023 年 8 月 21 日
I try in Ubuntu 22.04 and Matlab 2023a, and this launcher resolve the problem of two icons
/usr/share/applications/matlab.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/opt/MATLAB/R2023a/bin/glnxa64/cef_resources/matlab_icon.png
Name=MATLAB R2023a
Comment=Start MATLAB - The Language of Technical Computing
#Uncomment the following line and comment the line after to
#force matlab to use the 32 bits architecture
#Exec=matlab -arch=glnx86 -desktop
Exec=matlab -desktop
Terminal=false
Categories=Development;
StartupNotify=true
#Uncomment the following line if you've got several matlab icons in the launcher
StartupWMClass=MATLAB R2023a - academic use
Juan Sebastian Barreto
Juan Sebastian Barreto 2023 年 8 月 21 日
編集済み: Juan Sebastian Barreto 2023 年 8 月 21 日
Can you try with this solution https://askubuntu.com/a/1438261

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by