Active Topics

 


Reply
Thread Tools
fareed_xtreme's Avatar
Posts: 238 | Thanked: 291 times | Joined on Mar 2010 @ London, UK
#1
TrueCrypt Assistant
Mounting and Un-Mounting made EASY


Since last week, I was quite enthusiastic on trying to contribute to this forum which has assisted me in learning to interact with my device and enhance its capabilities. Therefore I decided to write an detailed script that will assist in mounting and unmounting a container/drive.

As I am still a Novice in Maemo, I have not developed any GUI for it, but once you use it, you'll be convinced that the script written has almost everything that you had wished for. Please feel free to edit it to your liking. Also I would really appreciate if someone could help make this into a deb package to make it easy to implement.

Disclaimer: This script in no way can edit, delete, modify or corrupt any data under no circumstances. It has been coded, keeping in mind the ease of access of the software TrueCrypt. The script only passes commands that has been pre-written and tailored as per your requirement.

Note: All commands are case sensitive... Please confirm what you are typing is in the proper case.


Checklist:

Before Proceeding, kindly confirm the following:
1. TrueCrypt is installed. (Package exists in Extras-Devel.)
2. You already have a TrueCrypt container or Drive. (In case you have not created, open Xterm and type
Code:
truecrypt -c
.


The Main Configuration:

The attachment consists 3 files.
1. Truecrypt.sh -The code. This is expected to be placed in
Code:
/home/user/.scripts/Truecrypt.sh
2. Truecrypt.desktop - The menu icon and execution method. To be placed in
Code:
/usr/share/applications/hildon
3. Crypt.png - The proposed iconfileto be seen in the Menu. To be placed in
Code:
/usr/share/icons/hicolor/scalable/hildon
The script is written assuming the Container exists in
Code:
/media/mmc1
with a name TrueCrypt .Full path
Code:
/media/mmc1/TrueCrypt
It also assumes the default mount location as
Code:
/media/Crypt
. All you need to do is either

Procedure 1: Edit the script and .desktop files to suit your requirement
Procedure 2: Setup your device as per the script's coding.

Procedure 1: Editing the script:

1. Using VI editor or leafpad, kindly change line 19 of Truecrypt.sh to the command you use to mount your drive.
2. Also in the desktop file edit the Line 7: as per your need.
You are expected to keep this ".desktop" file in
Code:
/usr/share/applications/hildon
The defaults in the .desktop file assumes your script to be in
Code:
/home/user/.scripts
3.The icon that you wish to place,must be placed in
Code:
/usr/share/icons/hicolor/scalable/hildon
Procedure 2: Setup your device as per the script's coding:

1. Open Xterm and become root.
2. Type
Code:
mkdir /media/Crypt
3. Place the truecrypt container in the memory card with a name TrueCrypt.
Code:
/media/mmc1/TrueCrypt
4. Using SSH, place the attached 3 files in their respective locations as stated in the start of this tutorial (The Main Configuration Section).


Note: All Commands are case sensitive.

Thats all about it. Just be patient to read it all and do accordingly. In case you havean issue, do not hesitate to put it up.

I wouldlike to thank 3 people who helped making this script possible.

1) Saturn
2) sacal
3) j.s
Your contributions helped immensely in the development of this script and make it functional.
Attached Files
File Type: zip TrueCrypt.zip (5.1 KB, 228 views)

Last edited by fareed_xtreme; 2011-01-02 at 20:02.
 

The Following 4 Users Say Thank You to fareed_xtreme For This Useful Post:
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#2
I'll wait to hear what the other lab rats say about this before using it myself, but i wanna thank you already, i've been waiting for somthing like this for quite some time
 
fareed_xtreme's Avatar
Posts: 238 | Thanked: 291 times | Joined on Mar 2010 @ London, UK
#3
Originally Posted by TiagoTiago View Post
I'll wait to hear what the other lab rats say about this before using it myself, but i wanna thank you already, i've been waiting for somthing like this for quite some time
Well, Seems like there aint many lab-rats around here other than me myself :P.

Well the best part is u needn't mess with any of the system files as such.

Also this was done under supervision of a few developers and the best help was from Saturn. I am trying to make it into a GUI but as i have to learn a new language, I have pushed it away for the time being. However, I have been the lab rat in this myself, ruined my phone once already in creating it and thats how i learnedthe do's and the dont's. And above all, read the code before you use. you will be surprised its nothin at all, just predefined commands.

Thanks for your interest anyways
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#4
Could you place it on -devel please?
 
fareed_xtreme's Avatar
Posts: 238 | Thanked: 291 times | Joined on Mar 2010 @ London, UK
#5
actually I have not created a GUI for this yet. Which means it is still not complete and I highly doubt it to be able to make it into the repos. Well pyQT is makin me bald (pullin my hair tryin to figure out :P)

I will try my best to try and complete this thing fit for the repos.
 
Posts: 118 | Thanked: 202 times | Joined on Aug 2010
#6
For simple GUI stuff you could have a look at zenity. It's used e.g. in Ubuntu to "GUI-ify" setup scripts and also work well on the N900. Very easy to learn, e.g. check here. Only downside is it's a bit slow.
 
Posts: 1,048 | Thanked: 1,127 times | Joined on Jan 2010 @ Amsterdam
#7
Thanks Fareed.

For my work I need to travel and communicate with my co-workers all over Europe. For that reason we have a dropbox account set up and today I was looking into file encryption, which works like a charm.

However, I am the tech guy from the company, and as such, probably the only one here that doesn't mind working from the command line.

A GUI for these scripts would be fantastic. I took a quick look at zenity but I think I'd rather go for Qt as dev platform.

However, I'd like to know if you have continued working on this project (GUI)?
 
Posts: 1 | Thanked: 0 times | Joined on Jun 2010
#8
Nice script fareed.
Unfortunately, I'm not able to mount my truecrypt volume as user, so the script, run as a user from a desktop shortcut, does not work. It works fine from the command line after sudo gainroot, but whenever I try to mount as a user after I enter the password for the volume it asks me for an administrator password and I get
Code:
Warning: Failed to obtain administrator privileges: Sorry, user user is not allowed to execute '/opt/maemo/usr/bin/truecrypt --core-service' as root on host
I'm new to truecrypt, so is there anything obvious I'm doing wrong?
I installed truecrypt from the official repository.
 
Posts: 9 | Thanked: 0 times | Joined on Apr 2011
#9
I always get "Invalid Argument" error and can't use this.
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:11.