桌面快捷方式是來自于Windows下的概念虽惭,在Ubuntu下這個概念被啟動器替代,那么如何添加Ubuntu桌面啟動器呢?
首先荆残,在Ubuntu下各種啟動器保存于/usr/share/applications下影涉,大部分軟件在安裝時會通過腳本完成啟動器添加工作橙困。
第一步逃糟,創(chuàng)建啟動器文件
sudo touch /usr/share/applications/SoftName.Desktop
第二步楼雹,編輯啟動器文件
sudo gedit /usr/share/applications/SoftName.Desktop
文件內(nèi)容如下柑爸,注意刪除后面的注釋
[Desktop Entry]//文件頭
Encoding=UTF-8//編碼方式
Name=XXX//應用程序名稱
Comment=comment//提示
Exec=//菜單執(zhí)行的命令或程序路徑
Icon=//顯示在菜單項中的圖標谱邪,可以為空
Terminal=false//是否使用終端
Type=Application//分類
Categories=//菜單所屬類別赦拘,可以確定該菜單的位置
注意:這里只是一個簡單的desktop文件樣例
[Desktop Entry]
Name=Sogou Pinyin
Name[zh_CN]=搜狗拼音
GenericName=Sogou Pinyin Input Method
GenericName[zh_CN]=搜狗拼音輸入法
Comment=Sogou Pinyin Input Method
Comment[zh_CN]=搜狗拼音輸入法
MimeType=application/x-sogouskin;application/x-scel;
Keywords=ime;imf;input;
Exec=sogou-qimpanel %U
Icon=fcitx-sogoupinyin
Terminal=false
Type=Application
NoDisplay=true
Categories=System;Utility;
StartupNotify=false
X-GNOME-Autostart-Phase=Applications
X-GNOME-Autostart-Notify=false
X-GNOME-Autostart-Delay=2
X-KDE-autostart-phase=1
X-KDE-autostart-after=panel
X-MATE-Autostart-Phase=Applications
X-MATE-Autostart-Delay=2
X-MATE-Autostart-Notify=false
像這個就是搜狗拼音的肃拜,如果需要研究詳細的文件說明忽冻,可以參考官方網(wǎng)站或者實用博客以及wiki备徐。