[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: loading truecrypt from the command line



The script now shows ;=
#!/bin/sh
# Zenaan Harkness, March 2013

DRV=/usr/bin/truecrypt
VOL=/home/boztu/Documents/bucket
MNT=/media/truecrypt1

truecrypt $VOL $MNT

which is called by a .bash_alias

alias tc='nohup truecrypt &'

and this works when you call 'tc' and it loads up the password entry
boxes, and stays open whilst the truecrypt icon stays live in the
status tray. You can safely CTRL+c to drop out of the programme, and
truecrypt stays alive and working. I'm quite happy with it  except i
can't work out how to get it to send me an email when it runs, but
that may come.

Sharon.

On 15/03/2013, Zenaan Harkness <zen@freedbms.net> wrote:
> On 3/15/13, Sharon Kimble <skimble04@gmail.com> wrote:
>> On 15/03/2013, Zenaan Harkness <zen@freedbms.net> wrote:
>>> I dug up my old command line script wrapper for truecrypt.
>>>
>>> Haven't used it for a few years, so YMMV.
>>>
>>> Here it is:
>>>
>>> #!/bin/sh
>>>
>>> DRV=/home/ME/truecrypt-source
>>> VOL=$DRV/data.tc
>>> MNT=/media/truecrypt1
>>>
>>> truecrypt $VOL $MNT
>>
>> Zenaan.
>> Your script now looks like this ;-
>>
>> #!/bin/sh
>> # Zenaan Harkness, March 2013
>>
>> DRV=/usr/bin/truecrypt
>> VOL=/home/boztu/Documents/bucket
>> MNT=/media/truecrypt1
>>
>> truecrypt $VOL $MNT
>>
>> and is called from a bash_alias of  - alias tc='nohup truecrypt &' so
>> that when its loaded I can just CTRL+c to come out and still leave
>> truecrypt running.
>>
>> Thanks, this is the most elegant solution so far, but there may be
>> others.
>> :)
>
> Wonderful, glad it works for you.
>
> BTW, the DRV= variable was an indirection for a mount point, which in
> my previous script I had an extra line just prior to "truecrypt $VOL
> $MNT" which said something like:
> gksudo mount $DRV
>
> So, now, and in your script, this variable is not being used. You can
> comment it out or delete it.
>
> Alternatively, since it seems to be pointing to a binary, you could
> replace "truecrypt $VOL $MNT" with:
>
> $DRV $VOL $MNT
>
> But in that case it would be better to replace DRV with RUN, PROG, or
> as I use CMD (for command).
>
> Here's how I would do your script above:
> #!/bin/sh
> VOL=/home/boztu/Documents/bucket
> MNT=/media/truecrypt1
> nohup truecrypt $VOL $MNT &
>
> and then save the file as "tc" with executable permissions of course.
> I don't know if "nohup ... &" works properly in a bash script... not
> sure if you should need the & - probably better to remove that, since
> I would not want it backgrounded until I had entered my password, and
> that happens automatically when truecrypt command exits, I think.
>
> cheers
> zenaan
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> Archive:
> [🔎] CAOsGNSQARykjxgDX70yccsrrdbXsA25oFthqk2Lh0cEt9VA10g@mail.gmail.com">http://lists.debian.org/[🔎] CAOsGNSQARykjxgDX70yccsrrdbXsA25oFthqk2Lh0cEt9VA10g@mail.gmail.com
>
>


-- 
A taste of linux = http://www.sharons.org.uk/taste/index.html
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian Wheezy, LXDE 2 LibreOffice 3.5.4.2
Registered Linux user 334501


Reply to: