View Single Post
fareed_xtreme's Avatar
Posts: 238 | Thanked: 291 times | Joined on Mar 2010 @ London, UK
#14
Originally Posted by sacal View Post
This is what i did in my device to manage mounting and unmounting a "cryptedfile.tc" located in my SD card:

1 - Create the "cryptedfile.tc" and move it to your SD card (it may also be MyDocs or other folder)

2 - Install Truecrypt Disk Encryption (command line) from the repos

3 - Create the empty folder /media/mycrypt

4 - Create the following script in /usr/bin:

Code:
/usr/bin/truecrypt --protect-hidden=no -k= /media/mmc1/cryptedfile.tc /media/mycrypt
ossofilemanager
/usr/bin/truecrypt --dismount /media/mycrypt
(replace /media/mmc1/cryptedfile.tc if the location off the crypted file is different)

5 - Create the file tcrypt.desktop in /usr/share/applications/hildon with the following contents:

Code:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Tcrypt
GenericName=Tcrypt access
Comment=Access tcrypt
Exec=osso-xterm "/usr/bin/tcrypt"
Icon=tcrypt
X-Osso-Type=application/x-executable
X-HildonDesk-ShowInToolbar=true
Terminal=true
Type=Application
StartupNotify=true
Categories=ConsoleOnly;System;
6 - Create a 48x48 png icon named tcrypt.png and move it to /home/usr/share/icons/hicolor/scalable/hildon.
I used the easycrypt icon

Whenever i need to use the crypt file i go to the applications menu and i select the truecrytp icon.
When x-terminal opens i input the crypt password and then filemanager opens with mycrypt mounted and ready for use.
As long as i keep filemanager running mycrypt remains mounted.
As soon as i close filemanger mycrypt folder is automatically unmounted.
Now this is what i call scripting..heehee... Awesome man.. but i really gotta get my first script to work so that I can learn more about linux scripting and make my device a powerhouse of scripts :P

BTW,What is a .tc file?Is it a TrueCrypt container file?