关于Ubuntu菜单项中的%U参数
来源:互联网 发布:c语言windows驱动编程 编辑:程序博客网 时间:2024/06/06 19:12
今天在研究chromium deb打包的时候,发现Google Chrome deb包中的/usr/share/applications/google-chrome.desktop文件定义入口为:
Exec=/usr/bin/google-chrome-stable %U
这个%U参数是做什么用的呢?查找了一下资料,有如下描述:
%u A single URL. Local files may either be passed as file: URLs or as file path.%U A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path.
也就是说,加入了%U参数,可以传递多个URL给Chrome浏览器,浏览器会依次打开各URL。比如您在文件管理器中选择了多个html文件,然后在鼠标右键菜单中点击”Open with Google Chrome”,Chrome浏览器就会依次打开所选的网页。
以下是Exec支持的参数说明,来自http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html:
Code Description%f A single file name, even if multiple files are selected. The system reading the desktop entry should recognize that the program in question cannot handle multiple file arguments, and it should should probably spawn and execute multiple copies of a program for each selected file if the program is not able to handle additional file arguments. If files are not on the local file system (i.e. are on HTTP or FTP locations), the files will be copied to the local file system and %f will be expanded to point at the temporary file. Used for programs that do not understand the URL syntax.%F A list of files. Use for apps that can open several local files at once. Each file is passed as a separate argument to the executable program.%u A single URL. Local files may either be passed as file: URLs or as file path.%U A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path.%d Deprecated.%D Deprecated.%n Deprecated.%N Deprecated.%i The Icon key of the desktop entry expanded as two arguments, first --icon and then the value of the Icon key. Should not expand to any arguments if the Icon key is empty or missing.%c The translated name of the application as listed in the appropriate Name key in the desktop entry.%k The location of the desktop file as either a URI (if for example gotten from the vfolder system) or a local filename or empty if no location is known.%v Deprecated.%m Deprecated.
0 0
- 关于Ubuntu菜单项中的%U参数
- ubuntu 13.10中的eclipse菜单项无法点击
- 菜单项参数
- 关于参数中的引用
- 关于makefile中的参数
- 关于Yaffs2在u-boot中的支持
- 关于mfc中的屏蔽右键菜单
- 关于C++中的缺省参数
- 关于java中的参数传递
- 关于QTP中的参数化
- 关于EXPDP中的PARALLEL参数
- 关于java中的参数传递
- 关于c函数中的参数 "..."
- 关于url参数中的引号
- 关于放大器中的SR参数
- 关于thinkphp中U函数传参数问题
- Ubuntu 添加右键菜单项
- 关于把Ubuntu安装在U盘的问题
- Codeforces Round #248 (Div. 1)C(AC自动机+DP)
- 关于C#多线程的学习和一点疑惑
- Sqlserver2000连接Oracle11G数据库进行数据实时同步
- wordpress主题(2)日志内容
- 同步内核缓冲区
- 关于Ubuntu菜单项中的%U参数
- gdb 调试常规命令
- android ImageButton的一些使用tip
- 广度优先搜索(BFS)
- spring的6个不同的功能模块
- _cdecl 和_stdcall
- [Leetcode]Majority Element
- Pancake Sorting问题研究与优化
- python正则表达式 分割字符串