5

When I try to edit a file in a remote directory (through SSH, SFTP or FTP) I must close the file to get a dialog box tell me if I want to upload the file. I want to upload it automatically on save!

I've already used Konqueror/Dolphin/Krusader as file managers and many other text editors but without any success. It seems that the problem is in the KIOExec application.

How can I edit KIOExec to automatic upload files on save? I don't want to return to using Gnome!

Gareth
  • 19,080

4 Answers4

4

Although this is a somewhat old question it still is unanswered. I also wanted to:

  • open Dolphin/Konqueror with sftp://user@remotesite/
  • choose to open a file to edit
  • have upload on save working

As described by the original poster, the upload only happens after closing the editor.

The only way to have something similar to this working is using kate and opening the file from kate. Stating the sftp://user@remotesite/filetoedit on open.

Here the upload on save works.

After the open with menu on dolphin updated to have kate, the open with kate also had the upload on save. Before, when manually stating kate in open with other it did not work.

P.S. I'm using kubuntu 11.10 with packages updated today.

2

Your best bet is to probably use sshfs. This lets you mount the remote resource to a directory of your choosing, after which it behaves like a local filesystem (albeit with some lag).

sudo apt-get install sshfs

Create a remote mount point, say /mnt/remote (could always use ~/MyCode/RemoteServerA too)

sudo mkdir /mnt/remote;
sudo chmod 777 /mnt/remote

Then mount the filesystem:

sshfs -p PORT_NUMBER user@remotesite:/path/to/remote/directory /mnt/remote

For more options type: sshfs --help

Now you can browse the filesystem with Dolphin and edit files normally, and they'll upload when you save. No need for any configuration beyond ssh on the remote host!

When you're done, remove the filesystem with

sudo umount /mnt/remote

If you get an error that it's in use, use

lsof /mnt/remote

to get a list of processes still using the mounted directory. You may need to configure file-indexing (if you use it) to avoid this mount point.

Augusto
  • 115
Fodagus
  • 121
0

Old question, for sure, but it's about to be released (KF5 - 5.66):

Adding support for mounting KIOFuse URLs for applications that don't use KIO

insaner
  • 385
0

But transfer-on-save is already the normal case. You cannot "edit KIOExec". Upgrade KDE to the latest stable version.

Double-clicking makes a local copy, this is for the benefit of non kio-enabled applications. If you really need to involve a file manager (instead of simply navigating from the editor itself), just drag & drop the remote file into the editor.

daxim
  • 1,357