Original author(s) | Sun Microsystems |
---|---|
Developer(s) | Glynn Foster Lucas Rocha |
Initial release | [dubious] |
Repository | |
Operating system | Unix-like |
License | GNU Lesser General Public License |
Website | wiki.gnome.org/Projects/Zenity |
Zenity is free software and a cross-platform program that allows the execution of GTKdialog boxes in command-line and shell scripts.
- I know I'm kinda late, but wanted just about the same thing, and figured it out in the end. My solution does a search (hiding errors), adds TRUE and a newline to each result (that was the key!), then sends the result to zenity.
- Mac (minimum) OS: Mountain Lion 10.8 or later for IDE (10.7 for compiled apps) Processor: Intel Celeron or better Memory: 1 GB RAM Graphics: Open GL 2.0-compatible or better Storage: 400 MB available space Sound Card: N/A; Mac (recommended) OS: Mountain Lion 10.9 or better Processor: Intel Core 2 or later Memory: 2 GB RAM.
- Zenity is not available for Windows but there are plenty of alternatives that runs on Windows with similar functionality. The most popular Windows alternative is Yad, which is both free and Open Source.If that doesn't suit you, our users have ranked 19 alternatives to Zenity and 13 are available for Windows so hopefully you can find a suitable replacement.
- I'm trying to take input from the user using the zenity command. Here's the command I'm passing to zenity: zenity -question -title 'Share File' -text 'Do you want to share file?' Here's the code using Java to execute the command.
I'm porting some simple X windows/bash scripts to Mac OSX, but I cannot find a build of Zenity (a Gnome app for basic GUI dialogs) for OSX. Is there some other command line driven dialog utility I.
Description[edit]
Like tools such as whiptail and dialog, Zenity allows easy creation of GUIs,[1] though it has fewer features than more complex GUI-creation tools.[2]
Other scripting languages such as Perl and Python can be used to construct full-scale GUI applications, but the zenity program enables a shell script to interact with a GUI user.... [The] user interface is not as refined as one that could be provided by a full-featured GUI application, but it is perfectly suitable for simple interactions.
Cross-platform compatibility[edit]
Zenity For Macbook Air
As of 2012, Zenity is available for Linux, BSD and Windows.[4] A Zenity port to Mac OS X is available in MacPorts and Homebrew.
As of 2018, Zenity ports for Windows are available: zenity-windows (based on version 3.20.0) and winzenity (based on 3.8.0 / statically linked)
Zenity does not possess any built-in scripting capabilities and it must, therefore, rely on an interpreter for processing. To create a script that runs on more than one platform without extensive modifications, it would be best to use an interpreter that is available on the widest range of operating systems. One option is Python in combination with the PyZenity library.[5]
Cross-platform script example[edit]
POSIX shell script example[edit]
Microsoft Windows example[edit]
See also[edit]
References[edit]
Zenity Mac Terminal
- ^Cartwright, Ryan (2009-01-30), 'More fun with Zenity: shell script/GUI interactivity', Free Software Magazine, archived from the original on 2011-11-06, retrieved 2011-12-10
- ^Diehl, Mike (2008-05-12), 'Make Your Scripts User Friendly with Zenity', LinuxJournal, archived from the original on 2011-11-26, retrieved 2011-12-10
- ^Tyler, Chris (2006), 'Chapter 4. Basic System Management', Fedora Linux, O'Reilly Media, pp. 258–259, ISBN978-0-596-52682-5, archived from the original on 2011-07-15, retrieved 2010-03-15
- ^Zenity for Windows, archived from the original on 2012-01-12, retrieved 2011-12-10
- ^Ramos, Brian (2011-04-20), PyZenity, archived from the original on 2013-10-07, retrieved 2012-11-15