You are not logged in.

#1 2010-11-21 17:40:19

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

[Solved] Zenity and ecryptfs utility GUI problem

I am writing a very short bash script to somewhat automate the mounting and unmounting of my ecryptfs filesystem. First thing I need to do is run "ecyptfs-add-passphrase", a small utility to insert the authenticated token into my session keyring. In a terminal it is done like this:

[larry@eagle ~]$ ecryptfs-add-passphrase
Passphrase: 
Inserted auth tok with sig [xxxxxxxxxxxxx] into the user session keyring

In my bash script I have this:

ecryptfs-add-passphrase < `zenity --entry --hide-text --text="Enter your encryption passphrase now."`

That sort of works but with the strange result that the Zenity GUI box pops up twice asking for the passphrase and in a terminal I get this message:

./crypt.sh: line 6: MyPassPhrase: ambiguous redirect

Any assistance greatly appreciated.

EDIT: Fixed my problem by piping the passphrase rather than using a file redirect, ie:

ans=`zenity --entry --hide-text --text="Enter your encryption passphrase now."`
echo $ans | ecryptfs-add-passphrase

Last edited by lagagnon (2010-11-21 18:22:00)


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

Board footer

Powered by FluxBB