Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have files with extensions .txt, .sln and .csproj, they all have mime type text/plain. But they should be opened by different programs. .txt - by Vim, .sln and .csproj - by Rider. How can I achieve this?

1 Answer

Here is explained how to create custom MIME type based on the file extension. I had to change their solution as follows:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns=""> <mime-type type="text/solution"> <comment>Rider solution file</comment> <glob pattern="*.sln"/> </mime-type>
</mime-info>

And add this file as rider.xml to /usr/share/mime/packages.

It works but still looks like a hack. Is there a cleaner way to achieve this?

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy