From bb879130cf8333a3dae8515438d925bcf1a75c40 Mon Sep 17 00:00:00 2001
From: nathansmith
For the longest time I just used thunar because its decent and default in xfce though I decided
- to give spacefm a try as of writing this. I might got annoyed of it in a week and ditch it or
+ to give spaceFM a try as of writing this. I might got annoyed of it in a week and ditch it or
end up really liking it. These kinds of things tend to go either way for me. I will either
- fucking hate it or wonder how I ever lived without it.
-
- I am fucking around with udisks2/udiskie and udevil to see what works better for my uses.
- To get encrypted partitions working I add udiskie as a startup app in xfce to handle that
- shit. Spacefm makes encrypted partitions a pain in the ass but its really configurable so
- with enough hacks you can get spacefm to do anything. Thats the magic of spacefm.
+ fucking hate it or wonder how I ever lived without it.
+ Update: After using it for a little bit I really dig it and never want to go back.
+
+ SpaceFM doesnt support encrypted partitions by default but lucky for us its very customizable. + To get encrypted disks working I use udisks2 and udiskie. +
+udiskie -s
as a autostarted app.
+ The -s option makes udiskie show a tray icon and hide it when there arent any disks. -t will show
+ the tray all the time and by default udiskie will not show a tray.crypto_LUKS
udiskie-mount %v
udiskie-umount $(lsblk -n -o MOUNTPOINT %v)
+
+ Spacefm uses sshfs for sftp support. Once you install it you will be ready to rock. Though
+ for my use case I need symlink support. sshfs needs to have the option -o follow_symlinks
+ To support symlinks. To add the option go to Devices->Settings->Protocol Handlers->ssh and change the
+ mount option to:
+
+ #!/bin/bash
+
+ [[ -n "$fm_url_user" ]] && fm_url_user="${fm_url_user}@"
+ [[ -z "$fm_url_port" ]] && fm_url_port=22
+ echo ">>> sshfs -o follow_symlinks -p $fm_url_port $fm_url_user$fm_url_host:$fm_url_path %a"
+ echo
+ # Run sshfs through nohup to prevent disconnect on terminal close
+ sshtmp="$(mktemp --tmpdir spacefm-ssh-output-XXXXXXXX.tmp)" || exit 1
+ nohup sshfs -o follow_symlinks -p $fm_url_port $fm_url_user$fm_url_host:$fm_url_path %a &> "$sshtmp"
+ err=$?
+ [[ -e "$sshtmp" ]] && cat "$sshtmp" ; rm -f "$sshtmp"
+ [[ $err -eq 0 ]] # set error status
+
+ # Alternate Method - if enabled, disable nohup line above and
+ # uncheck Run In Terminal
+ # # Run sshfs in a terminal without SpaceFM task. sshfs disconnects when the
+ # # terminal is closed
+ # spacefm -s run-task cmd --terminal "echo 'Connecting to $fm_url'; echo; sshfs -p $fm_url_port $fm_url_user$fm_url_host:$fm_url_path %a; if [ $? -ne 0 ]; then echo; echo '[ Finished ] Press Enter to close'; else echo; echo 'Press Enter to close (closing this window may unmount sshfs)'; fi; read" & sleep 1
+