
Truecrypt mount and unmount scripts
Source (link to git-repo or to original if based on someone elses unmodified work):
Available as/for:
Description:by Taboom
INTRODUCTION
This zip file contains two .sh files for mounting and unmounting TrueCrypt partitions with some dialogues. When mounting passwords are stored in KDE Wallet so you have to open it. If you mount a partition for the first time, the password for the drive will be asked and then stored in KDE Wallet. After that all you need when mounting is an open KDE Wallet, which you will be asked to open if necessary. To change the password later you have to do it manually in KDE Wallet. The key for the KDE Wallet stored passwords is the device (ex. /dev/hda1). By default the KDE Wallet is closed after using it. Not having KDE Wallet installed should not be a problem - you should be asked for a password normally anyways.
Unmounting supports both normal and forced unmounting. All is done with nice dialogues in each stage. These are very simple scripts, but I decided to share them with the world, as I couldn't find them myself.
USAGE
Create two desktop icons which link to the scripts and give as parameters the source and the destination for the TrueCrypt partition. Now clicking the icons allow you to mount and unmount your partitions via dialogues. Very simple, but useful. Remember to make all the scripts executable.
FUTURE
I know there's are usability issues with opening KDE Wallet as there is nothing saying why you open KDE Wallet but I don't have time or need to fix this currently. TrueCrypt 4.3 does not allow setting mount-options as user so this can also be a problem.
CREDITS
I believe the idea for these scripts came from http://gentoo-wiki.com/TIP_EncFS and especially Kevin Wennemuth who wrote the scrips, so thank's to him. Script parts for accessing the KDE Wallet is originally from Jochen Hoenicke at http://hoenicke.ath.cx/kwallet/. They have been edited for better functionality in this script.
1.0 Initial release
1.1 Added KDE Wallet support
1.2 Opening KDE Wallet fixed, script did not always open kdewallet and never closed it. Kwallet script (needed parts) integrated into mount script. Some minor cosmetic changes.
Ratings & Comments
5 Comments
As of TrueCrypt 5.0 this is somewhat unneccessary as tc 5.0 adds a linux GUI, unless kwallet suppor is wanted. For now, however, this script does NOT work with tc 5.0. The last successfully tested version is 4.3.
With all the respect - integration with kdewallet reduces truecrypt functionality. Seriously. Your script stores password as-is (per source) - in that situation user has to remove this password when he wants to switch partition type. Furthermore in situation when he is enforced to reveal his data there is no possibility to enter normal partition password. It will be entered "magically" Maybe there should be a switch to ignore kdewallet?
#If parameters are missing if [ -z "$SOURCE" ]; then SOURCE_TYPE=$(kdialog --radiolist "TrueCrypt: Mount" 0 "File" on 1 "Directory" off) if [ "$SOURCE_TYPE" = "0" ] then SOURCE=$(kfiledialog --caption "TrueCrypt: Mount SOURCE File?" --file) else SOURCE=$(kfiledialog --caption "TrueCrypt: Mount SOURCE Directory?" --directory) fi SOURCE_FETCHED=$? fi if [ -z "$DESTINATION" ]; then DESTINATION=$(kfiledialog --directory --caption "TrueCrypt: Mount DESTINATION?") DESTINATION_FETCHED=$? fi
mikrochip wants people to comment here too as it is a shell script and not a KDE application ;) I think we all should find a consensus. There may be people that come for shell scripts, but there are also people that look only for real KDE applications. The admin of the site should find a way to manage that. Personally I would think of having a small logo: - shell script logo - kde app logo etc.. A small icon. So that visitors can immediately verify whats this application for.
OK, it's a shell script, but its intention is hiding shell commands from unskilled users by using Kdialog, which is a KDE app. So I think it's a useful script for KDE, especially until there's a GUI for truecrypt under Linux/KDE. Greetings m0nk