<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:osnews="http://osnews.com/rss2#">
	<channel>
		<title>OSNews: </title>
		<link>http://www.osnews.com/story/20882/Zenity_Shell_Script_Interaction_Via_the_GUI</link>
		<description>Exploring the Future of Computing</description>
		<language>en-us</language>
		<copyright>Copyright 2001-2009, David Adams</copyright>
		<webMaster>adam+nospam@osnews.com</webMaster>
		<lastBuildDate>Sun, 06 Dec 2009 18:20:17 GMT</lastBuildDate>
		<image>
			<url>http://www.osnews.com/images/osnews.gif</url>
			<title>OSNews.com</title>
			<link>http://www.osnews.com</link>
		</image>
		<item>
			<title>1-line summary...</title>
			<link>http://osnews.com/thread?346266</link>
			<guid isPermaLink="true">http://osnews.com/thread?346266</guid>
			<description>It's a tool to show simple dialog boxes from the terminal. These tools have been around forever. Big deal.<br />
<br />
The author uses it to pop up a message when his network-connection script runs. Seems he just realised that there's a world of desktop users out there too. Taking care to make your programs (shell scripts or otherwise) user-friendly, interactive and informative isn't newsworthy. Indeed, it should be compulsory.</description>
			<pubDate>Fri, 30 Jan 2009 19:10:00 GMT</pubDate>
			<author>donotreply@osnews.com (Morph)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Comment by flanque</title>
			<link>http://osnews.com/thread?346267</link>
			<guid isPermaLink="true">http://osnews.com/thread?346267</guid>
			<description>I'm not sure you can convert the power of the shell to a GUI. A major selling point of the shell is piping commands together and I just cannot see how this'll be possible on the GUI.</description>
			<pubDate>Fri, 30 Jan 2009 19:22:00 GMT</pubDate>
			<author>donotreply@osnews.com (flanque)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Avoiding the shell</title>
			<link>http://osnews.com/thread?346271</link>
			<guid isPermaLink="true">http://osnews.com/thread?346271</guid>
			<description>&quot;Whilst an increasing number of recent converts are avoiding it&quot;<br />
<br />
I often see glib statements about new Unix users avoiding the shell. What I have not seen is any basis for these statements.</description>
			<pubDate>Fri, 30 Jan 2009 19:33:00 GMT</pubDate>
			<author>donotreply@osnews.com (massysett)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: 1-line summary...</title>
			<link>http://osnews.com/thread?346278</link>
			<guid isPermaLink="true">http://osnews.com/thread?346278</guid>
			<description>Yeah.  What is needed is something like the Windows AutoHotKey that can intelligently script Qt and GTK applications.</description>
			<pubDate>Fri, 30 Jan 2009 20:22:00 GMT</pubDate>
			<author>donotreply@osnews.com (mmebane)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>hmmm</title>
			<link>http://osnews.com/thread?346279</link>
			<guid isPermaLink="true">http://osnews.com/thread?346279</guid>
			<description>From the article:<br />
<i>In my experience, users accustomed to a dialog with Yes/No buttons can find themselves stumped by a black window with a bunch of white text, the last line of which says something like Interface not found: proceed (Y/N)?.</i><br />
I find myself stumped reading this.</description>
			<pubDate>Fri, 30 Jan 2009 20:27:00 GMT</pubDate>
			<author>donotreply@osnews.com (righard)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>kdialog</title>
			<link>http://osnews.com/thread?346290</link>
			<guid isPermaLink="true">http://osnews.com/thread?346290</guid>
			<description>For KDE users there is kdialog. It has everything zenity has minus calender but plus many other things: --geticon, --getopenurl, --menu, --combobox, --password, --checklist, --radiolist etc.<br />
In combination with kfmclient (or kioclient for KDE4) this is really handy. I use it from python, too. e.g.: <a href="http://kde-apps.org/content/show.php/Get+YouTube+Video+(improved" rel="nofollow">http://kde-apps.org/content/show.php/Get+YouTube+Video+(improved</a>)?content=41456</description>
			<pubDate>Fri, 30 Jan 2009 21:49:00 GMT</pubDate>
			<author>donotreply@osnews.com (panzi)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Don't forget to check $DISPLAY and have text fallbacks</title>
			<link>http://osnews.com/thread?346408</link>
			<guid isPermaLink="true">http://osnews.com/thread?346408</guid>
			<description>zenity (or kdialog or xdialog etc.) are all well and good, but your shell script should check for $DISPLAY and only run zenity if it's set. If it isn't set, each GUI dialog prompt/display will need the equivalent text-only prompts/output.<br />
<br />
I'm about to do something similar myself with a text-only program I've written (in C - nothing wrong with system()'ing zenity from a binary - it's not just for shell scripts) - I'll be calling zenity for input and output, but only if $DISPLAY is set and /usr/bin/zenity is available (otherwise the old text input/output code will be used as a fallback).</description>
			<pubDate>Sat, 31 Jan 2009 19:55:00 GMT</pubDate>
			<author>donotreply@osnews.com (rklrkl)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>dialog</title>
			<link>http://osnews.com/thread?346471</link>
			<guid isPermaLink="true">http://osnews.com/thread?346471</guid>
			<description>there are also &quot;dialog&quot; program for text terminals, and &quot;gdialog&quot; which use zenity but has same parameters as dialog.<br />
so u can do something like on top of your script<br />
[ &quot;$DISPLAY&quot; ] &amp;&amp; DIALOG=&quot;gdialog&quot; || DIALOG=&quot;dialog&quot;</description>
			<pubDate>Sun, 01 Feb 2009 06:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (pawnhearts)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: 1-line summary...</title>
			<link>http://osnews.com/thread?346491</link>
			<guid isPermaLink="true">http://osnews.com/thread?346491</guid>
			<description>Yes, what you say is true.  But the problem is that to allow the user to work as he/she is used to may require quite a bit of work if you do it in any other way than zenity or kdialog.<br />
<br />
Like, for instance, having him pick a date.<br />
<br />
You can write a whole script and just use zenity to put up the user interactions with minimal work, and its all going to be very intuitive and normal for them.  <br />
<br />
Example at<br />
<br />
<a href="http://www.linuxjournal.com/content/make-your-scripts-user-friendly-zenity" rel="nofollow">http://www.linuxjournal.com/content/make-your-scripts-user-friendly...</a> <br />
<br />
What it means is, you can use shell scripts where otherwise you might be driven to a full blown gui language.</description>
			<pubDate>Sun, 01 Feb 2009 10:43:00 GMT</pubDate>
			<author>donotreply@osnews.com (alcibiades)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Comment by flanque</title>
			<link>http://osnews.com/thread?346493</link>
			<guid isPermaLink="true">http://osnews.com/thread?346493</guid>
			<description>Haven't actually done it, but it looks like the zenity commands to get the user input are just one line in the script.  You can still pipe anything to anything in the rest of the script, and also can pipe that input.</description>
			<pubDate>Sun, 01 Feb 2009 11:05:00 GMT</pubDate>
			<author>donotreply@osnews.com (alcibiades)</author>
			<category>Comments</category>
		</item>
	</channel>
</rss>
