1. 程式人生 > >CentOS 7 中,建立桌面快捷方式

CentOS 7 中,建立桌面快捷方式

今天在Centos上安裝了下Eclipse,但是安裝完了之後,發現只能從Eclipse的bin目錄中去執行eclipse指令碼來啟動Eclipse。
後再在網上了找個建立桌面快捷方式的辦法,記錄如下:

通過命令列,進入到桌面資料夾中

cd /home/your_username/desktop

新建一個以“.desktop”結尾的檔案

vim eclipse.desktop

將以下內容寫至該檔案中

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=eclipse
Type=Application
Terminal
=false Name[en_US]=eclipse Exec=**/opt/eclipse/mars/eclipse** Comment[en_US]=Eclipse Mars.2 Comment=Eclipse Mars.2 GenericName[en_US]= Icon=/opt/eclipse/mars/eclipse.png

注意“Exec”填寫成 Eclipse 的指令碼檔案的路徑即可。