1

I am running lubuntu in a VirtualBox. In my file manager (PCManFM-Qt) I navigate to

sftp://myusername@myremotehost:/mydirectory

and open myfile.txt with SublimeText. I can edit and save this file without problems.

However, after some time passes (or for example after putting the machine to sleep), whenever I try to save I am greeted with the error:

Unable to save /run/user/1000/gvfs/sftp:host=myremotehost,user=myusername/mydirectory/myfile.txt
Error: No such file or directory

which does not seem to go away until after I restart the entire system. I cannot even re-open the file or any other file from the remote host into SublimeText; instead SublimeText just opens a blank file called "sftp".

I can still open these files with any other text editor on my system (such as gedit and notepadqq) so the problem seems to be with SublimeText.

Is there a fix for this?

9
  • Likely the connection was closed for inactivity and Sublime Text then remembers that the network path was unavailable. Try when this happens to stop Sublime Text and start it again. In the meantime, save your file locally.
    – harrymc
    Commented Jul 20, 2020 at 15:59
  • @harrymc I have tried closing and reopening SublimeText but it does not work - the only fix I have found is restarting the entire system Commented Jul 20, 2020 at 19:08
  • What happens if you restart SublimeText to open another document from the same directory?
    – harrymc
    Commented Jul 20, 2020 at 19:10
  • @harrymc that also opens a blank file with the name "sftp" Commented Jul 20, 2020 at 19:31
  • (1) Try a clean install of Sublime to see if the problem involves a plugin. (2) Sublime Text may not be really closing, so check if it keeps running some process in the background that needs to be killed.
    – harrymc
    Commented Jul 20, 2020 at 19:43

1 Answer 1

0

I found the solution.

Open a terminal and execute killall gvfsd, then use the file browser to re-navigate to the remote directory. (Closing and re-opening any remote files is not necessary!)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .