Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-25-2006, 02:13 PM   #1
Registered: Apr 2004
Location: Paris, FRANCE
Distribution: Ubuntu
Posts: 54

Rep: Reputation: 16
Question How to automatically execute a command (TrueCrypt) on mount

Simply that : I would like to make my Ubuntu automatically execute some script when my USB token is mounted.

I'm already using udev to create a /dev/myusbkey device, so it's always mounted at the same place (let's say /media/myusbkey) in the filesystem.

What would be the most convenient / portable / easy way to do it ?

Note : I would use this to automatically mount the TrueCrypt volume on my usb key when mounted, so if you have a better idea for this specific need...
Old 08-27-2006, 02:11 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
TrueCrypt sounds like an encoded/encrypted FS ... do you need to use
a password/passphrase to get to it?

Old 08-27-2006, 10:42 AM   #3
Registered: Apr 2004
Location: Paris, FRANCE
Distribution: Ubuntu
Posts: 54

Original Poster
Rep: Reputation: 16
Yes it's an encoded fs and I need to type a password to get it mounted.

Since the fs is actually a file on my usb token (FAT), the token has first to be mounted and only then I can mount the encoded file as a volume using the 'truecrypt' command

Two steps on my Ubuntu.

If only I knew a way to trigger an arbitrary command on an USB insertion event, I could do it in one step.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to automatically execute a command when cd is mounted? LiquidSlumber Linux - Software 1 03-26-2006 01:18 AM
i need to write a program it has to execute automatically ykirankumar Linux - Software 5 08-31-2004 12:34 AM
execute php script automatically? brandnewbie Linux - Newbie 1 08-14-2004 05:42 AM
? to add a command to execute automatically when xwindows loads up Kasperisa Linux - Newbie 2 08-02-2003 10:16 AM
execute mount (or any) command on startup frieza Linux - Software 3 04-29-2003 06:09 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration