# 我的linux日常生活-7.將非安裝軟體新增到程式清單 ###### tags: `我的linux日常生活` 在現實工作中,有許多軟體釋免安裝的 大多數免安裝軟體的啟動方式都會在軟體的 bin 資料夾中找到類似 **start.sh** 的檔案 這時候只需要在終端機下 ```shell= bash [軟體根目錄]/bin/start.sh ``` 就可以啟動了 但是看到Gome 的華麗桌面難道Linux 不可以向 Windows 一樣在程式清單新增啟動程式的小圖案,方便在使用過程中找出程式? 答案是可以的,只要在 ``` /usr/share/applications ``` 這個目錄底下新增 [xxxxx.desktop] 系統就會自動新增程式捷徑到程式單清單中。 這次我以 kettle 軟體當範例: 首先直接新增一個捷徑配置檔 PentahoDataIntegration.desktop ``` sudo vim /usr/share/applications/PentahoDataIntegration.desktop ``` 輸入以下內容: ```shell= [Desktop Entry] Encoding=UTF-8 Type=[必須填] # [必須填] Name=PentahoDataIntegration # [必須填]要顯示的程式說明 Exec=/bin/sh "/home/jameschang/var/data-integration/spoon.sh" # 要執行的檔案位址,當type 是 Application 才會有意義 Icon=/home/jameschang/var/data-integration/spoon.ico # 要顯示的icon Categories=Application;Development; # 程式歸類 Version=1.0 # 指這份文件的版本 StartupNotify=true Terminal=0 Comment=kettle # 說明 ``` 結果如圖 ![將非安裝軟體新增到程式清單](https://i.imgur.com/rfhOiMO.png "將非安裝軟體新增到程式清單") 上述範例只是我比較常用的詳細的話可以閱讀[Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)這篇 ## 參考資料 [Desktop Entry创建Linux程序的快捷方式 Kyunban](https://www.jianshu.com/p/ebcffc0a06cf) [freedesktop.org](https://www.freedesktop.org/wiki/) [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)