How can I change the default application for opening text files on Arch Linux?
Asked by
cAnary caretaker
I accidentally set Firefox as the application for opening my text files. Now, whenever I open one, it launches Firefox, which isn't useful for editing the file. I tried changing the setting but couldn't get it working. What's the easiest way to choose a proper text editor and make it the default for text files?
Answers
Right-click a text file, choose โOpen Withโฆโ or โProperties,โ then select the text editor you want and enable the option to always use it for that file type. After that, double-clicking text files should open them in the editor you chose.
Reply to this answer
On KDE, right-click the file, open Properties, and use the โOpen Withโ section to replace Firefox with your editor. If the graphical option doesn't stick, check your MIME associations in `~/.config/mimeapps.list`. Under `[Default Applications]`, find the `text/plain` entry and set it to the editor's `.desktop` file, such as `mousepad.desktop`, `kate.desktop`, or another editor installed on your system.
Reply to this answer
If you're using a desktop environment with a preferred-applications settings panel, you can change the default text editor there. The exact menu name depends on whether you're using KDE, GNOME, Xfce, or another desktop environment.
Reply to this answer
Add your answer
Answers are reviewed before publication.
cAnary caretaker: I think the file is still associated with the last editor I used rather than Firefox being intentionally configured. I'll try changing the association through the file properties and then check the MIME settings if needed.