您的位置:首页 > 理论基础 > 计算机网络

Ubuntu中某些程序无法打开网络共享文件

2008-10-26 13:33 579 查看
在 ubuntu 中有很多程序打开网络共享文件,无法打开或者明确提示无法打开。一个很有可能的原因是在
/usr/share/applications 中对应的 desktop 文件中 Exec 项中的参数不对。(含有汉字的路径或者含有汉字的文件名也需要这样处理)

例如:

Rhythmbox音乐播放器 无法打开 smb://音乐/三环边上.wma

处理方法

sudo gedit /usr/share/applications/rhythmbox.desktop

把其中的

Exec=rhythmbox %U

改为

Exec=rhythmbox %F

即可。

常用的参数有:%f %F %u %U,解释如下:

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

单个文件名,即使选择了多个文件。如果已选择的文件不在本地文件系统中(比如说在HTTP或者FTP上),这个文件将被作为一个临时文件复制到本地,%f将指向本地临时文件;

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

单个URL。本地文件以文件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.

URL列表。每个URL以分割段的方式传递给执行程序。本地文件以文件URL或文件路径的方式传递。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐