Oben Sonne committed f1b4326

Add information to automatically unmount on logout

  • Participants
  • Parent commits 2c78ae0

Comments (0)

Files changed (1)

       -e, --edit           edit an EncFS item in keyring
       -r, --remove         remove an EncFS item from keyring
 Usage should be straight forward - otherwise [submit an issue][7].
+### Automatically unmount EncFS folders on logout
+Unfortunately there's no equivalent to GNOME's autostart scripts which could be
+used to automatically unmount your EncFS folders on logout (without shutting
+down). However, there's a manual solution using a [GDM hook script][gdm]:
+`/etc/gdm/PostSession/Default`. Open this file in an editor (requires *root*
+privileges) and add this line:
+    mount | grep "^encfs" | grep "user=$USER" | awk '{print $3}' | while read MPOINT ; do sudo -u $USER fusermount -u "$MPOINT" ; done
+This script is executed whenever you logout from GNOME. With this line, it
+looks for mounted EncFS folders of the user currently logging out. Then it
+unmounts each, using the `fusermount` command (note that this command is
+executed as *root*, that's why there is a `sudo -u $USER` before the
+`fusermount` command).