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

Ida avatar
By Ida
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

--
Tags: Linux

All Comments

Elma avatar
By Elma
at 2008-11-19T09:22
原來如此 感謝

關於更改權限的問題?

Victoria avatar
By Victoria
at 2008-11-14T14:42
最近工作站更改使用者資料夾的權限 我是打chmod 這個指令 但是更動過以後 使用者要登入卻顯示路徑有錯誤 your home directory is listed as and#34;home/ee/userand#34; but it does not appear to exist 請問一下這要如何 ...

Re: Email被雅虎拒收똿

Kelly avatar
By Kelly
at 2008-11-14T14:01
※ 引述《dollya.bbsatbbs.ntu.edu.tw (大頭)》之銘言: : 不知各位的mail servr 寄往Yahoo mail server 會被拒收嗎? : 我又不曾大量寄信,也被拒....,不知怎解決?? 通常架設的mail server我寄過去都會在yahoo user的垃圾信件夾中 ...

關於SD 卡 格式化成ext3

Irma avatar
By Irma
at 2008-11-14T13:14
※ 引述《airjaguar (捷豹)》之銘言: : 我把一張8G的SD 卡用 gparted格式化成ext3 的格式 : 結果發現 格式化完 可用空間 只有7G : 裏面明明是空的 : 友人知道這是怎麼回是嘛? : 拜託各位了 知道的告訴我一下~~ 我來亂講一下, 1. 高級的Filesystem本 ...

ubuntu 套件

Kumar avatar
By Kumar
at 2008-11-14T11:55
※ 引述《sunkill.bbsatbbs.sayya.org (linux才是王道)》之銘言: : ※ 引述《angel212310.bbsatptt.cc (小康)》之銘言: : andgt; 某篇文章說 temp裡的資料 在 開機 或 關機 時會自動刪除 : andgt; 這是真的嗎??? 那那 ...

apt-get install initrd-tools找不到in …

Adele avatar
By Adele
at 2008-11-14T11:40
※ 引述《aowen (...)》之銘言: : ※ 引述《aowen (...)》之銘言: : : 我的系統是ubuntu 8.04 : : 最近試著更新kernel : : 在kernel跟module都編譯好後, : : 最後make install,在/boot/底下卻沒產生inttrd.img ...