Skip navigation.

SSHFS Mounts and AppDirs

I've been experimenting with a way to combine FUSE/SSHFS with ROX AppDirs and its support of mountpoints.

I have a hackish version now that works well enough for me. Perhaps others could suggest improvements.


ROX Filer, FUSE, SSHFS, and password-less ssh access to the remote host (see ssh-keygen and .ssh/authorized_keys).

The last part is required to keep the Filer/Desktop from hanging while waiting for a password to be entered.


The standard umount command will not unmount fuse-mounted mountpoints. You need to use fusermount -u for that (or be root?). So, using the new configurable mount/umount commands in ROX-Filer 2.5, I created the following myumount command and put it in my path and set ROX-Filer to use this in place of umount.

if [ -z "`mount | grep "$1" | grep fuse`" ]; then
	pumount "$1";
	fusermount -u "$1";

All this does is call fusermount -u for the passed in mountpoint if it is a 'fuse' mount. Otherwise is just calls umount.


I created a ~/mnt/ folder and in that folder created AppDirs with the remote host name as the folder name. In each folder I put an executable copy of the following AppRun script:

MOUNT_PATH=`dirname "$0"` export MOUNT_PATH
HOST=`basename "$MOUNT_PATH"` export HOST
sshfs -o nonempty $HOST: $MOUNT_PATH
rox -x $MOUNT_PATH

This uses the dir name as the host name and the AppDir as the mountpoint. The -o nonempty is necessary due to the fact that AppRun is in that dir.

If the sshfs mount requires a password, everything will hang waiting for a password to be entered on stdin. The first enhancement I would like to see is a way to detect this and prompt for the password, but so far I cannot see how to do that with sshfs.

Make it Pretty:

Put your favorite 'mount point' icon in as a .DirIcon. Something folderish.


The first double-click does the mounting and updates the icon status in the Filer. The next time you enter the mounted dir like normal. Unmounting works as normal, except that ROX doesn't ask you to unmount it when you leave the dir like with other mountpoints.

Note: you can use 'username@host' as the dir name and it works as you would expect.

Suggestions for improvement welcome. I would guess that this could have security problems and other operation issues, but it works for me. :)

Set myumount

How do you set ROX-Filer to use myumount instead of umount?

See the Options dialog...

>So, using the new configurable mount/umount commands in ROX-Filer 2.5

I don't exactly remember where, but there are options for this in the main ROX-Filer Options dialog.

Syndicate content