歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> CentOS 7 中,創建桌面快捷方式

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

日期:2017/3/3 14:10:40   编辑:Linux技術

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

通過命令行,進入到桌面文件夾中

[code]cd /home/your_username/desktop
新建一個以“.desktop”結尾的文件

[code]vim eclipse.desktop
將以下內容寫至該文件中

[code]#!/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 的腳本文件的路徑即可。

Copyright © Linux教程網 All Rights Reserved