Ubuntu – FTP files opened from Nautilus opens in Firefox instead of default application (Ubuntu 18.04)

18.04default-programsfirefoxftpnautilus

I often use Nautilus to connect to my ftp server. Whenever I open a remote file from nautilus (even when it states that the default program is something like gedit) it still opens that file in firefox. Choosing the "Open with Other Application" option works, but it's annoying having to do that every time. I remember reading that this is a known bug and it has to do with some other application/library and not with Nautilus, but I can't find url to that bug anymore.

Again, This is only an issue when opening remote/ftp files and is not an issue with local files.

Best Answer

If you mainly want to edit files with gedit, you can add the following line to ~/.config/mimeapps.list

x-scheme-handler/ftp=org.gnome.gedit.desktop

Put it under the block "Default Applications". It works for me, but it sets the default program for ALL ftp-files to gedit.

Related Question