Ubuntu 创建应用图标

497 阅读1分钟

下面以 android_studio 为例。

一、几个目录

/usr/local/:按照 linux 惯例,我会把应用安装在 /usr/local/ 目录下。

/usr/local/android-studio:是 android_studio 应用目录。

/usr/local/android-studio/bin:是 android_studio 启动文件的目录。

/usr/local/android-studio/bin/studio.sh:是 android_studio 启动文件。

/usr/local/share/applications:是应用快捷方式所在目录。快捷方式文件为 xxx.desktop

创建 xxx.desktop 文件

vim android_studio.desktop

写入以下内容,保存退出。

[Desktop Entry]
Type=Application
Name=Android Studio
Exec=/usr/local/android-studio/bin/studio.sh
Icon=/usr/local/android-studio/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true

将 xxx.desktop 文件移动到 /usr/local/share/applications 目录

sudo cp android_studio.desktop /usr/local/share/applications/