open a file by gvim editor in linux firefox
Hi I have a web page which link to a file, the extension is rpt. E.g. xxxx.rpt. How could I open the file by gvim editor when I click the link. I have tried some methods like adding in application, or something else but it seems not to work. My Os is linux redhat 6.7. Hope you can solve my questtion. Thank you.
All Replies (3)
What MIME type is this about?
- File extension:
xdg-mime query filetype *.rpt - MIME type:
xdg-mime query default application/x-rpt
You should be able to add an extra section to handlers.json under "mimeTypes" with the correct MIME type.
"application/x-rpt":{"action":0,"extensions":["rpt"]}
If the server is not sending a helpful content-type header for .rpt files, you could use my add-on to override that to something you can manage. An example of how is in this thread: https://support.mozilla.org/questions/1247067
Hi cor-el
Thank you for the help. As your question, I listed as below. xdg-mime query filetype *.rpt => No match xdg-mime query default application/x-rpt => nothing I didn’t have the file handlers.json, so I created it under the folder the same with mimeTypes.rdf. And the content is as below, but it doesn’t work. Could you give me more suggestion? Thanks in advance. “mimeTypes”:{"application/x-rpt":{"action":0,"extensions":["rpt"]}}