http://linux-wiki.cn/index.php?title=%E6%96%87%E4%BB%B6%E5%85%B3%E8%81%94&feed=atom&action=history
文件关联 - 修订历史
2024-03-28T09:20:49Z
本站上此页的修订历史
MediaWiki 1.17.0
http://linux-wiki.cn/index.php?title=%E6%96%87%E4%BB%B6%E5%85%B3%E8%81%94&diff=1802&oldid=prev
Chenxing在2012年3月12日 (一) 21:15
2012-03-12T21:15:59Z
<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2012年3月12日 (一) 21:15所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第1行:</td>
<td colspan="2" class="diff-lineno">第1行:</td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 本文讨论设置文件的 <del class="diffchange diffchange-inline">可选 </del>打开方式 <del class="diffchange diffchange-inline">和默认 </del>打开方式 <del class="diffchange diffchange-inline">。依据所使用的桌面环境不同,设置方法也有所差异 </del>。</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 本文讨论设置文件的<ins class="diffchange diffchange-inline">'''默认 </ins>打开方式<ins class="diffchange diffchange-inline">'''及其它'''可选 </ins>打开方式<ins class="diffchange diffchange-inline">''' </ins>。</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>{{<del class="diffchange diffchange-inline">Note</del>| <del class="diffchange diffchange-inline">一些程序打开 </del>文件的方式 <del class="diffchange diffchange-inline">可能与桌面环境不 </del>一 <del class="diffchange diffchange-inline">致 </del>, <del class="diffchange diffchange-inline">如设置Firefox的打开方式设置方法 </del>见[[ <del class="diffchange diffchange-inline">修改Firefox的默认 </del>文件 <del class="diffchange diffchange-inline">打开方式</del>]]。}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>{{<ins class="diffchange diffchange-inline">Hint</ins>|文件的 <ins class="diffchange diffchange-inline">打开 </ins>方式一 <ins class="diffchange diffchange-inline">般由文件内容的[[MIME]]类型判定 </ins>, <ins class="diffchange diffchange-inline">有关内容请参 </ins>见[[文件 <ins class="diffchange diffchange-inline">类型(文件内容)</ins>]]。}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{{Hint|文件的 </del>打开方式一 <del class="diffchange diffchange-inline">般由 </del>文件 <del class="diffchange diffchange-inline">内容 </del>的 <del class="diffchange diffchange-inline">类型判定 </del>, <del class="diffchange diffchange-inline">有 </del>关文件 <del class="diffchange diffchange-inline">类型请参见[[ </del>文件 <del class="diffchange diffchange-inline">类型( </del>文件 <del class="diffchange diffchange-inline">内容)]] </del>。<del class="diffchange diffchange-inline">}}</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">==设置默认 </ins>打开方式<ins class="diffchange diffchange-inline">==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">===桌面环境配置===</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> </ins>一 <ins class="diffchange diffchange-inline">些桌面环境提供了设置 </ins>文件 <ins class="diffchange diffchange-inline">关联 </ins>的 <ins class="diffchange diffchange-inline">图形界面。如KDE 4中 </ins>, <ins class="diffchange diffchange-inline">只需打开“系统设置”,就能看到“文件 </ins>关 <ins class="diffchange diffchange-inline">联”设置(此设置影响KDE中及<tt>kde-open</tt>命令打开 </ins>文件 <ins class="diffchange diffchange-inline">的方法)。GNOME中,在 </ins>文件 <ins class="diffchange diffchange-inline">管理器中查看某个 </ins>文件 <ins class="diffchange diffchange-inline">的“属性”,能看到“打开方式”标签页,通过它亦可简单地设置文件的打开方式 </ins>。</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>==<del class="diffchange diffchange-inline">KDE 4</del>==</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>==<ins class="diffchange diffchange-inline">=桌面环境无关软件=</ins>==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">KDE 4提供了图形化 </del>的 <del class="diffchange diffchange-inline">文件关联配置工具 </del>, <del class="diffchange diffchange-inline">只需 </del>打 <del class="diffchange diffchange-inline">开KDE 4提供的“系统设置”,就能看到“ </del>文件 <del class="diffchange diffchange-inline">关联”图标。使用'''kde-open'''命令可以按照该 </del>设置 <del class="diffchange diffchange-inline">打开文件 </del>。</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">{{Hint|该类软件 </ins>的 <ins class="diffchange diffchange-inline">一个例子是Firefox </ins>, <ins class="diffchange diffchange-inline">其 </ins>打 <ins class="diffchange diffchange-inline">开 </ins>文件 <ins class="diffchange diffchange-inline">的方法不受GNOME/KDE </ins>设置 <ins class="diffchange diffchange-inline">的影响 </ins>。<ins class="diffchange diffchange-inline">}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">==GNOME==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">通过手工修改配置文件可影响桌面环境无关应用程序和<tt>xdg-open</tt>命令 </ins>的 <ins class="diffchange diffchange-inline">行为。相关 </ins>配置 <ins class="diffchange diffchange-inline">文件包括''~/.local/share/applications/defaults.list''和''/usr/share/applications/defaults.list'',前者为用户设置,比后者(系统设置)有更高的优先级。</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{{TODO|GNOME中 </del>的配置 <del class="diffchange diffchange-inline">方法}}</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">==直接修改配置文件==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 该文件的一个样例:</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  <del class="diffchange diffchange-inline">该方法可影响部分应用程序和'''xdg-open'''命令的行为,需要手工修改配置文件。其中影响到默认打开方式的文件有''~/.local/share/applications/defaults.list''和''/usr/share/applications/defaults.list'',前者为用户设置,比后者系统设置有更高的优先级。 </del>该文件的一个样例:</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><source lang="ini"></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><source lang="ini"></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[Default Applications]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[Default Applications]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>x-directory/normal=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>x-directory/normal=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>application/pdf=kde4/okularApplication_pdf.desktop;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>application/pdf=kde4/okularApplication_pdf.desktop;</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></source></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 注意该文件末尾应有一个空行。在该文件的每一节,等号左边是一个[[MIME]]类型名,右边是''/usr/share/applications''中的desktop文件列表,代表文件的优先打开方式。相应的类型和打开方式可以从与此文件格式相同的''/usr/share/applications/mimeinfo.cache''复制。''mimeinfo.cache''描述了所有已知类型文件的打开方式。<ref>[http://forums.fedoraforum.org/showthread.php?t=26875 Fedora Forum上很好的一个Howto(英文)]</ref></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 注意该文件末尾应有一个空行。在该文件的每一节,等号左边是一个[[MIME]]类型名,右边是''/usr/share/applications''中的desktop文件列表,代表文件的优先打开方式。相应的类型和打开方式可以从与此文件格式相同的''/usr/share/applications/mimeinfo.cache''复制。''mimeinfo.cache''描述了所有已知类型文件的打开方式。<ref>[http://forums.fedoraforum.org/showthread.php?t=26875 Fedora Forum上很好的一个Howto(英文)]</ref></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Note|''mimeinfo.cache''文件会被系统自动更新,千万不要手工修改此文件!网上有些引导大家修改此文件的教程是完全错误的。<ref>[http://hi.baidu.com/deking/blog/item/cbe55c89f8fc3abb0f2444b9.html 广为流传的有错误的教程]</ref>}}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Note|''mimeinfo.cache''文件会被系统自动更新,千万不要手工修改此文件!网上有些引导大家修改此文件的教程是完全错误的。<ref>[http://hi.baidu.com/deking/blog/item/cbe55c89f8fc3abb0f2444b9.html 广为流传的有错误的教程]</ref>}}</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">==定义新的文件打开方式==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">一个文件打开方式实际上就是一个''.desktop''文件,存放在''/usr/share/applications''和''~/.local/share/applications/''中。要创建新的打开方式,只要创建相应文件即可。如用PowerPoint Viewer打开ppt的例子:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"><source lang="ini"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[Desktop Entry]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"># 名称</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Name=Microsoft Office PowerPoint Viewer 2007</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"># 类型,应为Application、Link或Directory之一</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Type=Application</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"># 可处理的MIME类型</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">MimeType=application/x-wine-extension-ppt;</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"># 运行时的命令,%f为被打开文件的文件名</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Exec=wine "C:\\Program Files (x86)\\Microsoft Office\\Office12\\PPTVIEW.EXE" z:/%f</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"># 打开方式不用显示在菜单中</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">NoDisplay=true</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Icon=BF6D_ppvwicon.0</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></source></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">创建好文件后,以''.desktop''扩展名保存文件在上述两个路径之一,新的文件打开方式就就绪了,使用前一节的内容可以将其设为默认打开方式。有关''.desktop''文件格式的更多信息,可以参考相关文献<ref>[http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec?action=show&redirect=Standards%2Fdesktop-entry-spec FreeDesktop.org Desktop Entry Specification]</ref>。</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==参考链接==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==参考链接==</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E6%96%87%E4%BB%B6%E5%85%B3%E8%81%94&diff=1508&oldid=prev
Chenxing在2011年3月1日 (二) 20:09
2011-03-01T20:09:54Z
<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2011年3月1日 (二) 20:09所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第2行:</td>
<td colspan="2" class="diff-lineno">第2行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Note|一些程序打开文件的方式可能与桌面环境不一致,如设置Firefox的打开方式设置方法见[[修改Firefox的默认文件打开方式]]。}}</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Note|一些程序打开文件的方式可能与桌面环境不一致,如设置Firefox的打开方式设置方法见[[修改Firefox的默认文件打开方式]]。}}</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{{Hint|文件的打开方式一般由文件内容的类型判定,有关文件类型请参见[[文件类型(文件内容)]]。}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==KDE 4==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==KDE 4==</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E6%96%87%E4%BB%B6%E5%85%B3%E8%81%94&diff=1464&oldid=prev
Chenxing: 新页面: 本文讨论设置文件的可选打开方式和默认打开方式。依据所使用的桌面环境不同,设置方法也有所差异。 {{Note|一些程序打开文件的方式可能...
2010-11-21T23:57:36Z
<p>新页面: 本文讨论设置文件的可选打开方式和默认打开方式。依据所使用的桌面环境不同,设置方法也有所差异。 {{Note|一些程序打开文件的方式可能...</p>
<p><b>新建页面</b></p><div>本文讨论设置文件的可选打开方式和默认打开方式。依据所使用的桌面环境不同,设置方法也有所差异。<br />
<br />
{{Note|一些程序打开文件的方式可能与桌面环境不一致,如设置Firefox的打开方式设置方法见[[修改Firefox的默认文件打开方式]]。}}<br />
<br />
==KDE 4==<br />
KDE 4提供了图形化的文件关联配置工具,只需打开KDE 4提供的“系统设置”,就能看到“文件关联”图标。使用'''kde-open'''命令可以按照该设置打开文件。<br />
<br />
==GNOME==<br />
{{TODO|GNOME中的配置方法}}<br />
<br />
==直接修改配置文件==<br />
该方法可影响部分应用程序和'''xdg-open'''命令的行为,需要手工修改配置文件。其中影响到默认打开方式的文件有''~/.local/share/applications/defaults.list''和''/usr/share/applications/defaults.list'',前者为用户设置,比后者系统设置有更高的优先级。该文件的一个样例:<br />
<source lang="ini"><br />
[Default Applications]<br />
x-directory/normal=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;<br />
application/pdf=kde4/okularApplication_pdf.desktop;<br />
<br />
</source><br />
注意该文件末尾应有一个空行。在该文件的每一节,等号左边是一个[[MIME]]类型名,右边是''/usr/share/applications''中的desktop文件列表,代表文件的优先打开方式。相应的类型和打开方式可以从与此文件格式相同的''/usr/share/applications/mimeinfo.cache''复制。''mimeinfo.cache''描述了所有已知类型文件的打开方式。<ref>[http://forums.fedoraforum.org/showthread.php?t=26875 Fedora Forum上很好的一个Howto(英文)]</ref><br />
<br />
{{Note|''mimeinfo.cache''文件会被系统自动更新,千万不要手工修改此文件!网上有些引导大家修改此文件的教程是完全错误的。<ref>[http://hi.baidu.com/deking/blog/item/cbe55c89f8fc3abb0f2444b9.html 广为流传的有错误的教程]</ref>}}<br />
<br />
==参考链接==<br />
<references /><br />
<br />
[[Category: 软件管理]]</div>
Chenxing