Mint Serena 64 bit using the Mate desktop environment. Most of the following scripts will run on this machine, although some have only been tested with the Gnome desktop. Extra software requirements can be met by the Ubuntu and safe PPA repositories. Scripts may be re-written or added to from time to time, the date serves as the version number. Syntax highlighting on these pages is provided by GVim's "Convert to HTML" option.

Private directory on/off

#!/bin/bash
# Filename: private.sh
# Version: 011210
# Author: robz
# Toggle the mounting and unmounting of the default ecryptfs ~/.Private
# directory. If you're set up with a Private/.Private directory that is.
# https://help.ubuntu.com/community/EncryptedPrivateDirectory - all you need.
# Run it from a launcher if you like, Type: Application, Name: Private,
# Command: /home/user/.scripts/private.sh, Comment: Private Directory on/off.
# You can use the encrypted directory for email and browser profiles, just
# move the relevant directory eg. /home/*user*/.evolution to /home/*user*
# /Private/.evolution and replace it with a symbolic link. Make sure the
# link has exactly the same name eg. ".evolution" not "Link to .evolution"
# You'll need some padlock icons for the notification.
 
grep ~/Private /etc/mtab > /dev/null
if [ "$?" -eq "0" ]; then
    ecryptfs-umount-private
    notify-send -i /$HOME/.icons/lock.png \
    "Private Directory is LOCKED" "Browser and email profiles inaccessable"
else
    gnome-terminal --geometry=36x4 --title="Private" -x bash -c "\
    echo -e 'Access to \"Private\" Directory'
    ecryptfs-mount-private
    notify-send -i /$HOME/.icons/unlock.png 'Private Directory is UNLOCKED'"
fi
sudo -K


Powered by ScribeFire.

No comments: