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

来源:互联网 发布:酒店业数据 编辑:程序博客网 时间:2024/06/04 20:06

今天在Centos上安装了下Eclipse,但是安装完了之后,发现只能从Eclipse的bin目录中去执行eclipse脚本来启动Eclipse。
后再在网上了找个创建桌面快捷方式的办法,记录如下:

通过命令行,进入到桌面文件夹中

cd /home/your_username/desktop

新建一个以“.desktop”结尾的文件

vim eclipse.desktop

将以下内容写至该文件中

#!/usr/bin/env xdg-open[Desktop Entry]Version=1.0Encoding=UTF-8Name=eclipseType=ApplicationTerminal=falseName[en_US]=eclipseExec=**/opt/eclipse/mars/eclipse**Comment[en_US]=Eclipse Mars.2Comment=Eclipse Mars.2GenericName[en_US]=Icon=/opt/eclipse/mars/eclipse.png

注意“Exec”填写成 Eclipse 的脚本文件的路径即可。

0 0