linux快捷方式配置文件,[Desktop Entry] -- Linux桌面快捷方式配置文件小解

刚在eclipse官网下载了eclipse4.2.2. 发现里面没有自带快捷方式的配置文件。然而我们平时不可能每次都找到软件的目录再启动~~SO..

我先贴出我的快捷方式的配置文件再做一一解释--- ! -_-  勤做笔记,方便以后回顾

环境:

Ubuntu 13.04

Unity Desktop

Eclipse 4.2.2

配置文件:

[Desktop Entry]

Version=4.2.2

//这里面是设置软件的版本

Enconde=UTF-8

//这个是设置配置文件的字符编码

Name=ecipse

//这个是Desktop Entry的名字,若只有这个,默认显示这个

Name[zh_CN]=eclipse

//这个是Desktop Entry的中文名字,若是其他语言,只要更改方括号里面的语言参数即可

GenericName=eclipse

//这个是通用名字,好像在窗口才能显示设置的名字

Comment=JAVA IDE

//当前Desktop Entry的简单描述

Exec=/home/crper/eclipse/eclipse

//程序执行路径

Terminal=false

//是否在终端运行,boolean类型,ture or false

Type=Application

//运行类型,程序或者连接,也就是Application or link(若是这个需要添加URL参数)

Catagories=Application;Program;

//程序归类,很好理解的就是在启动菜单能明显看出来

Icon=/home/crper/eclipse/1.png

//Desktop Entry的启动图标,支持xpm , png (其他木有尝试过)

StartupNotify=false

//很直白的参数。。启动通知,只针对Application有效

OnlyShowIn=Unity;

//这个是说Desktop Entry 运行在哪种桌面环境,常用的值有:GNOME;KDE;Unity;

注意:创建了Deskop Entry这个快捷方式,需要改变他的权限才能运行,默认是只读文件

实际配置文件中不可以存在C OR JAVA单行注释的

效果图:

0818b9ca8b590ca3270a3433284dd417.png

(这图片不是用shutter,国产优秀软件deepin scrot,比QQ截图强大)

额外详解

刚才我写的配置是基础中的基础,想要了解更加详细和学习大的更多的,可以查看下这个网站(需要有一定英文水平--google找到的,强大的引擎)

截取一部分参数出来保存,方便回顾

Table 2. Standard Keys

Key

Description

Value Type

REQ?

Type

Type

This specification defines 3 types of desktop entries: Application (type 1), Link (type 2) and Directory (type 3). To allow the addition of new types in the future, implementations should ignore desktop entries with an unknown type.

string

YES

Version

Version of the Desktop Entry Specification that the desktop entry conforms with. Entries that confirm with this version of the specification should use1.0. Note that the version field is not required to be present.

string

NO

1-3

Name

Specific name of the application, for example "Mozilla".

localestring

YES

1-3

GenericName

Generic name of the application, for example "Web Browser".

localestring

NO

1-3

NoDisplay

NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. thenetscape -remote, orkfmclient openURL kind of stuff).

boolean

NO

1-3

Comment

Tooltip for the entry, for example "View sites on the Internet". The value should not be redundant with the values ofName andGenericName.

localestring

NO

1-3

Icon

Icon to display in file manager, menus, etc. If the name is an absolute path, the given file will be used. If the name is not an absolute path, the algorithm described in theIcon Theme Specification will be used to locate the icon.

localestring

NO

1-3

Hidden

Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the.desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by lettingmake install install a file withHidden=true in it.

boolean

NO

1-3

OnlyShowIn, NotShowIn

A list of strings identifying the environments that should display/not display a given desktop entry. Only one of these keys, eitherOnlyShowIn orNotShowIn, may appear in a group (for possible values see theDesktop Menu Specification).

string(s)

NO

1-3

TryExec

Path to an executable file on disk used to determine if the program is actually installed. If the path is not an absolute path, the file is looked up in the $PATH environment variable. If the file is not present or if it is not executable, the entry may be ignored (not be used in menus, for example).

string

NO

1

Exec

Program to execute, possibly with arguments. See the Exec key for details on how this key works.

string

YES

1

Path

If entry is of type Application, the working directory to run the program in.

string

NO

1

Terminal

Whether the program runs in a terminal window.

boolean

NO

1

Actions

Identifiers for application actions. This can be used to tell the application to make a specific action, different from the default behavior. TheApplication actions section describes how actions work.

string(s)

NO

1

MimeType

The MIME type(s) supported by this application.

string(s)

NO

1

Categories

Categories in which the entry should be shown in a menu (for possible values see theDesktop Menu Specification).

string(s)

NO

1

Keywords

A list of strings which may be used in addition to other metadata to describe this entry. This can be useful e.g. to facilitate searching through entries. The values are not meant for display, and should not be redundant with the values ofName or GenericName.

localestring(s)

NO

1

StartupNotify

If true, it is KNOWN that the application will send a "remove"message when started with the DESKTOP_STARTUP_ID environment variable set.If false, it is KNOWN that the application does not workwith startup notification at all (does not shown any window, breakseven when using StartupWMClass, etc.).If absent, a reasonable handling is up to implementations (assuming false,using StartupWMClass, etc.). (See theStartup Notification Protocol Specification for more details).

boolean

NO

1

StartupWMClass

If specified, it is known that the application will map at least onewindow with the given string as its WM class or WM name hint (see theStartup Notification Protocol Specification for more details).

string

NO

1

URL

If entry is Link type, the URL to access.

string

YES

2

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值