Gnome

–no-desktop 和 %U 有什麼用?

  • September 23, 2013

我想知道為什麼這個論點在啟動 nautilus 或 pcmanfm 時如此重要。如果我不這樣做會怎樣?

另外,我想知道 %U 的含義是什麼:

Exec=pcmanfm %U

在後台執行的 Nautilus 實例正在管理您的桌面,因此當您執行 Nautilus 的後續實例時,它--no-desktop會告訴 Nautilus 不要嘗試管理桌面圖示等。

%U傳入 URL 列表的方法:

%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.

列表的其餘部分可以在freedesktop.org 文件的“執行密鑰部分”中找到。這是其餘的。

摘抄

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.

引用自:https://unix.stackexchange.com/questions/91934