我为我的问题引用了这个链接:如何创建启动器图标
虽然我的matlab图标已经创建好了,但是只要我点击它,它就会显示几秒钟:

然后,应用程序自动关闭自己!
每次我都要从终端上运行它,MATLAB才能真正打开它,并超越启动屏幕:
/usr/local/MATLAB/R2017a/bin/matlab虽然上面的方法工作得很好,但我希望能够从图标上正确地运行它,但我似乎不知道问题出在哪里。
正如上面的链接所提到的,在上面投票的答案中,我首先这样做了:
sudo ln /usr/share/app-install/desktop/matlab-support:matlab.desktop /usr/share/applications/matlab.desktop然后删除.matlab文件的所有内容,并将其替换为:
[Desktop Entry]
X-AppInstall-Package=matlab-support
X-AppInstall-Popcon=4
X-AppInstall-Section=multiverse
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/MATLAB/R2017a/bin/matlab -desktop
Name=MATLAB
Icon=/usr/share/app-install/icons/_usr_share_icons_hicolor_48x48_apps_matlab.png
Categories=Development;Math;Science
Comment=Scientific computing environment
StartupNotify=true
StartupWMClass=com-mathworks-util-PostVMInit
X-Ubuntu-Gettext-Domain=app-install-data当我重试执行第一步时,我会得到以下消息:
ln: failed to create hard link '/usr/share/applications/matlab.desktop': File exists然后,我尝试创建一个软链接,正如其中一个答案所建议的:
ln -s /usr/local/MATLAB/R2017a/bin/matlab /usr/local/bin/matlab
似乎什么都不适合我,救命!
发布于 2018-01-12 17:48:24
你的方法有两个问题。
sudo ln -s pathToLink pathToTarget这是正确的命令:
sudo ln -s /usr/share/applications/matlab.desktop /usr/share/app-install/desktop/matlab-support:matlab.desktop
https://askubuntu.com/questions/995226
复制相似问题