Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-21-2007, 02:30 PM   #1
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
python gtk program almost done, stuck at os.popen? Maybe?

Hey guys,
I'm just about done with my DM-Crypt / LUKS wrapper gui.
I'm just stuck at one step. I need to run:

cryptsetup --verbose --cipher 'aes-cbc-essiv:sha256 _
--key-size 256 --verify-passphrase luksFormat /dev/loop0

some of the above is in variables but thats neither here nor there. I can run it w/o the --verify-passphrase option but that is pointless because when u do luksOpen you have to enter a password anyway.

I tried:
cmd = <above cryptsetup command>
a = os.popen(cmd, "w")
a.write(password) #For First Prompt
a.write(password) #For Second Prompt

Turns out, this doesn't work.
Can someone help me figure out how I can pass the password to the prompts when the prompts are displayed?

I've been searching the net and I haven't found anything that I understand.

Thanks for you help,
Old 03-22-2007, 03:44 PM   #2
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Original Poster
Rep: Reputation: 58
I just wanted to clarify one thing:

When I run the cryptsetup command, it says can not verify passphrase on a non-tty terminal. Is there another way around this? Or does anyone know how to use os.execv command?



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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with python David the H. Linux - Software 2 02-08-2007 09:18 AM
Getting GTK to work with python crazyjimbo Programming 4 11-27-2006 01:14 PM
WineX, python-gnome, and python-gtk DrD Fedora 0 08-03-2004 01:11 PM
GTK Doesn't Update? Stuck on 1.2.7 GT_Onizuka Linux - Software 3 11-22-2003 03:38 PM
Gtk-Warning but program still works... I close konsole, program closes Laptop2250 Linux - Software 2 11-15-2003 12:18 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:59 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