請問一下 "%" 的問題 - Linux

By Ida
at 2008-11-14T14:59
at 2008-11-14T14:59
Table of Contents
圖形化操作介面以滑鼠點選就能執行程式,
那麼桌面管理系統就必需知道程式如何開啟所選定的檔案,
例如某個特定程式的參數, 一次只能指定一個檔案或是多個,
或者能不能直接指定 URL, 而不限於 local file.
%f %F %u %U 這些東西叫做 field code 是 freedesktop 所制訂的規範,
gnome 按照此規範來管理啟動程式的依據.
請參考
http://standards.freedesktop.org/desktop-entry-spec/latest/
%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.
※ 引述《dirls (???)》之銘言:
: 不好意思,我沒有說清楚
: 我的意思是說
: gnome下面幾乎所有的應用程式都可以用終端機的方法開啟
: 例如在終端機下直接輸入firefox 就可以打開瀏灠器 (在我的電腦是這樣)
: 但是在桌面建立的捷徑
: 按右鍵看屬性
: 裡面指令是寫 firefox %u
: 我想請問一下
: 那個%u是代表什麼意義
--
How shall my heart be unsealed unless it is broken?
By Kahlil Gibran
--
那麼桌面管理系統就必需知道程式如何開啟所選定的檔案,
例如某個特定程式的參數, 一次只能指定一個檔案或是多個,
或者能不能直接指定 URL, 而不限於 local file.
%f %F %u %U 這些東西叫做 field code 是 freedesktop 所制訂的規範,
gnome 按照此規範來管理啟動程式的依據.
請參考
http://standards.freedesktop.org/desktop-entry-spec/latest/
%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.
※ 引述《dirls (???)》之銘言:
: 不好意思,我沒有說清楚
: 我的意思是說
: gnome下面幾乎所有的應用程式都可以用終端機的方法開啟
: 例如在終端機下直接輸入firefox 就可以打開瀏灠器 (在我的電腦是這樣)
: 但是在桌面建立的捷徑
: 按右鍵看屬性
: 裡面指令是寫 firefox %u
: 我想請問一下
: 那個%u是代表什麼意義
--
How shall my heart be unsealed unless it is broken?
By Kahlil Gibran
--
Tags:
Linux
All Comments

By Elma
at 2008-11-19T09:22
at 2008-11-19T09:22
Related Posts
關於更改權限的問題?

By Victoria
at 2008-11-14T14:42
at 2008-11-14T14:42
Re: Email被雅虎拒收똿

By Kelly
at 2008-11-14T14:01
at 2008-11-14T14:01
關於SD 卡 格式化成ext3

By Irma
at 2008-11-14T13:14
at 2008-11-14T13:14
ubuntu 套件

By Kumar
at 2008-11-14T11:55
at 2008-11-14T11:55
apt-get install initrd-tools找不到in …

By Adele
at 2008-11-14T11:40
at 2008-11-14T11:40