看板 Linux 關於我們 聯絡資訊
圖形化操作介面以滑鼠點選就能執行程式, 那麼桌面管理系統就必需知道程式如何開啟所選定的檔案, 例如某個特定程式的參數, 一次只能指定一個檔案或是多個, 或者能不能直接指定 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 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.8.136
dirls:原來如此 感謝 11/19 18:34