小编Sup*_*ted的帖子

如何使用xdg-mime命令

有人可以举例说明如何使用(使用GNOME Ubuntu)XDG-MIME命令吗?即使有了文档,我也在努力工作.

例如,如果我想使用名为MyApp的应用程序注册扩展名.mfe,那么步骤是什么?这是我到目前为止的尝试,我将不胜感激任何指示......

这是我的xml(MyApp-MyFileType.xml)文件名是如何相关的?

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/mfe">
    <comment>File for MyApp</comment>
    <glob pattern="*.mfe"/>
  </mime-type>
</mime-info>
Run Code Online (Sandbox Code Playgroud)

然后运行这个命令?

xdg-mime install MyApp-MyFileType.xml
Run Code Online (Sandbox Code Playgroud)

然后我运行这个?xxx与什么有关?,我理解它是我的应用程序的标识符,但我该如何定义它?

xdg-mime default xxx.desktop text/mfe
Run Code Online (Sandbox Code Playgroud)

linux installation ubuntu mime file-type

17
推荐指数
2
解决办法
2万
查看次数

标签 统计

file-type ×1

installation ×1

linux ×1

mime ×1

ubuntu ×1