Score:0

Some apps cannot open remote files mounted on SFTP

cn flag

After using Xubuntu (18.04, 20.04) I recently got a new PC and installed Ubuntu 22.04. For some reason some apps just cannot open files in a remote PC mounted via SFTP. Some other apps they just can.

I have found out that the apps suggested in the right click menu are the ones that can open the files. For example in the following right click menu all LibreOffice Writer, Text Editor (gedit) and Zotero) can open remote files:

enter image description here

but Geany and Sublime they can't. The same menu but now on a local file (on local files everything is working perfectly):

enter image description here

If in the remote file I do right click → open with and select Geany or any other app, it fails. The same if I run the command in the terminal:

$ geany sftp://me@remote/home/me_in_remote/file.txt
Could not find file 'sftp://me@remote/home/me_in_remote/file.txt'.

If instead of geany I use gedit now it works.

What could be the issue?

Score:0
hk flag

Geany does not support opening remote files. I guess this works with gedit, because it is well-integrated with GVFS and automatically mounts the remote directory when you give it a remote file to open.

There should be a workaround, however: with the file browser, navigate to the remote file system first. The file system is then made available transparently in one of the following folders: ~/.gvfs/ or /run/user/$UID/gvfs/

You should then be able to open the remote files from there using any tool, including Geany and Sublime.

cn flag
In my old Xubuntu 20.04 computer I can find the remote file system mounted in `/run/user/$UID/gvfs/`. In this Ubuntu 22.04 computer, however, it is not there. Do you know how to fix this? This is probably the issue.
Score:0
cn flag

TL;DR:

sudo apt install fuse3 gvfs-*

and

sudo reboot

solved the problem.

I found out that the remote file system was not being mounted in /run/user/$UID/gvfs. After some research I ended up here and that worked.

Score:0
cn flag

From the Geany FAQ:

Does Geany support editing files remotely through FTP or SSH?

No, Geany doesn't support any remote file editing. But you can easily mount remote filesystems through FTP, SSH or whatever with Fuse or LUFS. This is even better because the remote filesystem will become available for all your applications transparently.

If you have GVfs (Gnome >= 2.22) you may already have a Fuse mountpoint in ~/.gvfs/ (or /run/user/<uid>/gvfs) which you can tell Geany to open remote files from, after mounting the connection from a Gnome program such as Nautilus.

To avoid slow responsiveness, it is recommended to disable checking files for changes to not query the file's modification time. To do so, open the preferences dialog and set Disk check timeout in the Files tab to 0 which will disable it.

Mount sftp://me@remote and Geany can open a remote file.

Your previous install for Xubuntu 20.04 probably mounted the remote location and your current install does not.

cn flag
I have it mounted I think... I mean, I can click on files in the remote computer navigating there with Nautilus, and can right-click and ummount it. So I guess it is mounted.
cn flag
I added more info in the question. Also modified it as it is not only for Geany, I was just using it as an example but Sublime (and other apps) also fail.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.