LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Bash: what's wrong with gdialog ?? (https://www.linuxquestions.org/questions/programming-9/bash-whats-wrong-with-gdialog-696542/)

frenchn00b 01-11-2009 02:08 PM

Bash: what's wrong with gdialog ??
 
gdialog --title "User Input" --inputbox "Enter variable, please:"

Code:

VR=`gdialog --title "User Input" --inputbox "Enter variable, please:"` ; echo $VR
dsfsdf

nothing into VR :(

jcookeman 01-11-2009 02:34 PM

Use zenity:

Code:

VR=$(zenity --title "User Input" --entry --text "Enter variable, please:")

frenchn00b 01-11-2009 03:11 PM

Quote:

Originally Posted by jcookeman (Post 3404765)
Use zenity:

Code:

VR=$(zenity --title "User Input" --entry --text "Enter variable, please:")

I found by luck this way, but I dont know if it is okay ... ?
but it seems to work


Quote:

selection=$(gdialog --inputbox "Word to translate:" 100 100 2>&1)

jcookeman 01-11-2009 03:28 PM

Yes the gdialog man page says inputbox will print to standard error. So, it is logical that will work. I have no idea why they did it that way. But, I think Zenity is mean to replace gdialog, anyway.


All times are GMT -5. The time now is 08:13 AM.