Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

vifm used with sshfs is very handy for me on daily basis working with ssh nodes.

One issue that I have is this:

  1. Change from ssh folder to a local folder
  2. Restart ssh node
  3. After loading, I can't connect to the node again. The only solution is to restart vifm.

I get this error:

I tried deleting the folder ~/.local/share/vifm/fuse/002_sra_01.ssh, but then trying to reconnect (without restarting) resulted in this error:

It seems that vifm somehow knows about the history of connections and tried to re-use the folder that was previously used to mount ssh, an it can't use it.

I have to restart vifm a LOT of times every day. I would appreciate any suggestions.

One side question - I have this in my vifmrc:

" SshMount
filetype *.ssh
       \ {Mount with sshfs}
       \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,

Where does vifm get the %PARAM %DESTINATION_DIR %FOREGROUND from. I want to try re-executing the exact same command that vifm is using in terminal.

1 Answer

+1 vote
by

Yes, Vifm tracks which file is mounted where to avoid remounting it on repeated use. What it doesn't do is checking that the mount is still there and Vifm should be able to find that out from the list of mounts.

The workaround for now could be adding a number to the name of your .ssh-file and using Ctrl+A (i.e., increment that number) on the file before re-openning it. That's enough to make Vifm consider it a separate mount.

Where does vifm get the %PARAM %DESTINATION_DIR %FOREGROUND from.

  • %PARAM from the first line of the .ssh-file
  • %DESTINATION_DIR is made on demand inside 'fusehome' directory
  • %FOREGROUND doesn't expand to anything, it's a flag which defines how FUSE command is run
by

Thank you for your response.

Is there a way to unmount the ssh when the panel is changed to a local directory? I only change the directory to local when I am done with ssh.

by

No, FUSE filesystems are unmounted only in two cases:

  • when switching to a parent directory from the mount's root
  • when exiting Vifm

Maybe there could be an option for unmounting on changing directory.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...