Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 2796  / 3 Years ago, sun, october 24, 2021, 8:38:10

I installed ReText 3.1.3* and all suggested dependencies on Lubuntu 12.10 using apt-get.



If I run touch ~/Desktop/abcd.md, and subsequently double-click on abcd.md in PCManFM or on its icon on the desktop, the file opens with Leafpad.

The same thing happens if I use .mkd or .markdown as the extension. These extensions are among a few listed in /usr/share/mime/packages/x-retext-markdown.xml.

In these three cases, when I right-click on them and look at their properties, they're all "plain text documents".



If I try touch ~/Desktop/abcd.rst or touch ~/Desktop/abcd.rest, these files do open in ReText when double-clicked. These extensions are present in /usr/share/mime/packages/x-retext-rst.xml. These files are of type "reStructuredText document".



The image below illustrates what I see when I right-click on files with .md, .mkd or .markdown extensions (top left), or on files with .rest or .rst extensions (top right). The lower image is the view PCManFM takes of files with .mkd and .rst files.



composite of image showing open with and file manager panel



Even when right-clicking and going into Open With ... followed by the second Open With ... shows basically the same thing. The file with a .mkd extension is seen as a "plain text" file whereas the one with a .rst extension is seen as a reStructured Text file:



Open with images



While it's quite possible that I've unintentionally tweaked something somewhere, can someone set things right for me?



Just to be clear, these files are empty so their content isn't an issue:



[11:10 AM] ~/Desktop $ file abcd*
abcd.markdown: empty
abcd.md: empty
abcd.mkd: empty
abcd.rest: empty
abcd.rst: empty


The contents of /usr/share/applications/retext.desktop are:



[Desktop Entry]
Version=1.0
Name=ReText
Comment=Simple text editor for Markdown and reStructuredText
Categories=Office;TextEditor;
Exec=/usr/bin/retext %F
Type=Application
Icon=retext
MimeType=text/x-retext-markdown;text/x-retext-rst;


***** ReText was updated to 3.1.4 but the issue remains.


More From » lubuntu

 Answers
0

You can probably try with mimeopen, which is a tool used to pair a specific mimetype with a particular application.



Use a file with .mkd extension as a parameter of mimeopen.



As an example:



$ mimeopen file.mkd 
Please choose a default application for files of type text/x-retext-markdown

1) ReText (retext)
2) GNU Emacs 23 (emacs23)
3) gedit (gedit)
4) LibreOffice Writer (libreoffice-writer)
5) Other...

use application #


Now, enter the number of the application (in this case, 1) and all .mkd files should now open in Retext.


[#32683] Monday, October 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calronze

Total Points: 0
Total Questions: 110
Total Answers: 112

Location: Belarus
Member since Thu, Aug 11, 2022
2 Years ago
calronze questions
Sun, Jan 9, 22, 13:41, 2 Years ago
Wed, Feb 15, 23, 01:41, 1 Year ago
Sat, Jul 23, 22, 21:03, 2 Years ago
Sat, Feb 5, 22, 01:57, 2 Years ago
;