sFTP Text Editor

Hello,

Haiku daily driver here.

I’m just wondering if there are currently any text editors for Haiku that allow sFTP connections to remote servers? At the moment, I’m just using Terminal and Nano.

Geany, Vim and emacs come to mind, via plugins.

Welcome DJS!

“Pe” has a menu “Open from server…”, but I think it’s FTP, not sFTP. Not sure…

Is there a way to just mount the sFTP server as a volume in Tracker via something like FuSE maybe? Then any editor of your preference should work.

Hello. I am not on Haiku right now to be able to check, but probably Midnight Commander (mc) have support for SFTP connections. In that case, you can edit text files with the F4 key.

Maybe Kate can do it? Never checked it myself, but checking upstream I found:

Does Genio have this? (And if not, should it?)

This is IMHO the better way, instead of having to build network opening capabilities into any text editor or IDE.

It is possible to do this on Haiku, although not as straightforward as it probably could be. I managed to mount a volume from my linux server via SFTP under Haiku a few years ago, using userland_fs. Can’t remember the exact mount command, I think I got some help from pulkomandy and extrowerk IIRC.
What I still remember is something that nearly got me to pull my hair out: userland_fs can (or at least could at the time) only handle one connection at a time. I had smb activated in the network prefs, which also uses userland_fs. That caused all my mount attempts to fail even though it turned out that I had the correct command line.
I don’t know if this limitation still exists.

EDIT:
Here’s how to do it (at least it works this way):

  1. Install the required packages: pkgman install userland_fs sshfs_fuse
  2. Run the userland_fs server: /boot/system/servers/userlandfs_server sshfs
  3. create a directory for the mount point
  4. Mount the volume (in a new terminal): mount -t userlandfs -o ‘sshfs user@host:/remote/directory’ /path/to/mountpoint

found here: Using SSHFS (with Haiku) | Jessica Hamilton

1 Like

Thank you for the suggestions. I have tried @BlueSky using userland, but it just gives a Bad Port ID error message. My remote host uses a non-standard port, so not sure if this is not allowed with sshfs. I’ll have a look at what options are available.

You surely have to specify a non-standard port somewhere on the commandline. Haven’t tried it but according to the sshfs docs it should be the -p parameter.

Oh that indeed seems really convoluted for a casual user. I think ideally we’d one day have something like on macOS with a command “Connect to Server …” somewhere in Tracker.

You would then enter the connection information for your server, cloud drive service or similar and it would show up like a hard drive would.

It would also be good to have the option to remember the connection, i.e. create a kind of symlink or bookmark on the desktop which will just ask for the password and then connect when you click it if it’s not mounted already.

2 Likes

Or a remote filesystems preflet.

1 Like

Indeed. A nice gui way and automatic discoverability of network shares would be quite neat. The current way is not really nice for casual users

The network preferences can already be used to do this, but each filesystem must provide an add-on for it (since they must each ask a few specific things, it’s not easy to do a generic one directly in qaiku). If anyone is interested in writing one, the fusesmb-haiku filesystem package comes with an example.

2 Likes