linux添加软件快捷方式

编辑文件,格式如下

以VsCode为例,文件名:Code-desktop,并给执行权根

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=com.visualstudio.code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F
Icon=com.visualstudio.code

把`Code-desktop`保存到桌面,生成桌快捷启动

把`Code-desktop`保存到 /user/share/applications/,生成应用程序集图标

展示评论