桌面启动图标“启动应用程序时出错”

桌面启动图标“启动应用程序时出错”

我创建了以下 .desktop 项目用于启动 MySQL Workbench:

[Desktop Entry]
Version=0.99
Name=MSWB
Comment=MySQL Workbench
Exec=/usr/bin/mysql-workbench
Icon=/home/steve/Pictures/mswb.png
Terminal=false
Type=application
Categories=application

所有者是 root,权限为

-rwxr-xr-x  1 root  root   183 May 18 15:49 mswb.desktop

当我双击图标时,我收到“启动应用程序时出错”。日志中没有任何内容。按照另一个线程上的建议,我从终端窗口发出此信息

awk -F= '/Exec=/{system($2)}' mswb.desktop

程序立即启动。有什么解决方法吗?

答案1

MySQL Workbench 的 .desktop 文件已存在于 /usr/share/applications 中。它在这里...

$ more mysql-workbench.desktop [Desktop Entry]
Name=MySQL Workbench
Comment=MySQL Database Design, Administration and Development Tool
Exec=mysql-workbench
Terminal=false
Type=Application
Icon=mysql-workbench
MimeType=application/vnd.mysql-workbench-model;
Categories=GTK;Database;Development;
StartupWMClass=mysql-workbench-bin

相关内容