LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-11-2009, 02:08 PM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
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
 
Old 01-11-2009, 02:34 PM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Use zenity:

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

Last edited by jcookeman; 01-11-2009 at 02:36 PM.
 
Old 01-11-2009, 03:11 PM   #3
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by jcookeman View Post
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)
 
Old 01-11-2009, 03:28 PM   #4
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
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.
 
  


Reply


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
program output displayed in zenity/ gdialog/ dialog schneidz Programming 1 12-05-2006 02:27 AM
Bash Programming - Where am I going wrong? [NL]_Target Programming 9 07-21-2005 08:49 PM
what am I doing wrong in the bash shell? alexes Linux - Newbie 4 05-18-2004 01:33 AM
Bash Shell: What went wrong. shookie Red Hat 12 05-17-2004 08:03 AM
My first BASH script, what's wrong with it? szf2 Linux - Newbie 2 11-12-2003 01:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 AM.

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