How can I change the default app for opening text files on Arch Linux?
Asked by
MellowCactus47
I accidentally set Firefox as the application for opening my text files. Now double-clicking a plain-text file launches Firefox, which isn't useful for editing it. I tried looking through the settings but couldn't find a fix. What's the easiest way to choose a proper text editor and restore it as the default application on Arch Linux?
Answers
You can also check your desktop environmentโs preferred applications settings and change the default text editor there.
Reply to this answer
For a manual fix, edit ~/.config/mimeapps.list. Under [Default Applications], find the text/plain entry and replace Firefoxโs desktop file with the desktop file for your chosen editor. The relevant desktop files are usually in ~/.local/share/applications or one of the system application directories.
Reply to this answer
Right-click a .txt file and choose โOpen With.โ Select the text editor you want, then enable โAlways use this application for this file type.โ After that, double-clicking text files should open them in the selected editor.
Reply to this answer
In KDE, right-click the file, open Properties, and use the โOpen Withโ section to replace Firefox with your preferred editor.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowCactus47: It seems to be associated with the last editor I opened rather than intentionally set to Firefox, but Iโll try changing it through the file properties.