How to prevent ecryptfs from umounting home if tmux is still running?
Solution 1:
One possibility is to deactivate automatic umounting:
- Go to the directory
~/.ecryptfs
. - You should find a file
auto-umount
there. - Remove this file and your ECryptFS-folder will not be umonted at logout.
If you want to do it only at an existing tmux
session, I'd suggest writing a small script:
#!/bin/sh
if tmux has 2> /dev/null; then
touch ~/.ecryptfs/auto-umount
else
rm ~/.ecryptfs/auto-umount
fi
If there is an tmux session the script deletes the auto-umount and if not it touches it. Place that script in your shell .logout
file.