如何在Ubuntu中注册文件关联 [英] How do I register a file association in Ubuntu

查看:156
本文介绍了如何在Ubuntu中注册文件关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个Ubuntu安装程序,我需要注册我自己的文件扩展名我没有找到任何例子如何做到这一点。

I'm in the process of creating a Ubuntu Installer and I need to register my own file extension I cant find any examples of how to do this.

可以人们向我提供了一些关于如何做到这一点的脚本片段?

Could people provide me with some script snippets on how to do this?

注意:我使用 InstallJammer 帮助我创建安装程序,这样我可以调用外部脚本 - 这就是为什么一个脚本会是有益的。

NB: Im using InstallJammer to help me create the installer, which allows me to call external scripts - so that is why a script would be beneficial.

推荐答案

一个InstallJammer安装程序不会很好地与分发集成,但是这里。

An InstallJammer installer won't integrate very well with the distribution, but here goes.

使用 xdg-mime install和xdg-mime默认设置mimetype并将其关联。

Use xdg-mime install and xdg-mime default to set up the mimetype and associate it.

这篇关于如何在Ubuntu中注册文件关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆