You are not logged in.

#1 2025-09-16 23:29:30

TySpicer
Member
Registered: 2025-08-31
Posts: 138

[SOLVED] Text documents open in LibreOffice by default

I prefer to use xed for editing text files. After installing LibreOffice, opening a text file through nnn will open Writer by default. Of course, I can press "o" to open with whatever I want, but it would be convenient if I could change the default text editor.

After searching for a bit, I found that I could add the following line to `.bashrc`:

export EDITOR=/bin/xed

I tried a couple variants of this, including `/bin/xed` and just `xed`, but it still opens LibreOffice Writer. What else can I try to set the default text editor?

I'm in Hyprland, I'm not sure if there's something I can do in the config there.

Last edited by TySpicer (2025-09-18 00:01:50)

Offline

#2 2025-09-17 01:08:51

jonno2002
Member
Registered: 2016-11-21
Posts: 811

Re: [SOLVED] Text documents open in LibreOffice by default

i dont use NNN or wayland but im guessing its a default opener for mimetype, should be as simple as changing the default for 'text/plain' in ~/.config/mimeapps.list

https://github.com/jarun/nnn/wiki/Troub … ile-opener

https://wiki.archlinux.org/title/XDG_MIME_Applications

Offline

#3 2025-09-17 20:57:43

xerxes_
Member
Registered: 2018-04-29
Posts: 949

Re: [SOLVED] Text documents open in LibreOffice by default

Use your favorite graphic gui file manager to set mime type of filetype; I use for that double commander, thunar also can do that: right mouse click on txt file, open with, other, select desired app and set to always open with this app. It's similar like in Windows.

Offline

#4 2025-09-18 00:01:39

TySpicer
Member
Registered: 2025-08-31
Posts: 138

Re: [SOLVED] Text documents open in LibreOffice by default

Thanks for the help! This was a pretty easy fix. I installed selectdefaultapplication-git, which worked instantly.

Offline

Board footer

Powered by FluxBB