PDA

View Full Version : Zenity input to file



Logan513
June 1st, 2010, 11:53 PM
Okay, right now I have...


#/bin/bash

zInput=$(zenity --entry --text "Enter the text you want to translate:" --entry-text "Enter 1337 here");Now I want the contents of variable zInput into a .ltr file. So it can be
read later by other programs. How would I go about doing this? I have
googled it many many times and each time I come up empty handed. Is it
even possible? Oh and how do I get Zenity boxes to pop up without the Teminal
being open?

Thanks for at least taking the time to read. :)
_Logan_

Logan513
June 2nd, 2010, 12:22 AM
Never seems to fail. ;)
Every time I ask a question I find out the answer myself shortly after.

blchinezu
June 2nd, 2010, 12:23 AM
Okay, right now I have...


#/bin/bash

zInput=$(zenity --entry --text "Enter the text you want to translate:" --entry-text "Enter 1337 here");Now I want the contents of variable zInput into a .ltr file. So it can be
read later by other programs. How would I go about doing this? I have
googled it many many times and each time I come up empty handed. Is it
even possible? Oh and how do I get Zenity boxes to pop up without the Teminal
being open?

Thanks for at least taking the time to read. :)
_Logan_

it's actually really simple..
if you want zInput to be written to a a .ltr file:

echo "$zInput" > "/path-to-file/file-name.ltr"
that's it

rnerwein
June 3rd, 2010, 03:22 PM
hi
your question: Oh and how do I get Zenity boxes to pop up without the Teminal being open?
my answer:
insert into your script:
DISPLAY=:0
export DISPLAY
# i use this to run zenity via cron.
ciao