How to use Zenity with examples

preview_player
Показать описание
We look into how to use Zenity, showing some examples. Zenity is a graphical tool for your scripting that shows dialog boxes on the GUI and returns the result from Zenity back to your script.

Kubernetes at scale managed for you!
Use DigitalOcean Cluster AutoScaler to scale your clusters to seamlessly ensure performance during peak times.

Become a command line power user on day one. Get the intelligent terminal warp.

Support the channel and donate a coffee:

Or visit my blog at:

Outro music: Sanaas Scylla

#zenity #examples #xorg
Рекомендации по теме
Комментарии
Автор

Ooh, nice. Reminds me of an updated "dialog" tool. I never had much luck working with the dialog tool (too much redirection of input and output streams), but hopefully zenity will be easier to manage. I'll have to remember this for my shell scripts.

I was always impressed that the Slackware installer was written using dialog, after all the trouble I had getting it to do useful things :)

aaronperl
Автор

As an average dialog bash developer I'm amazed what zenity can do. Plus some functions on zenity don't require exec stdin and stdout (3>&1 2>&1 1>&3) (at least for now, I haven't gone deep through the zenity hole yet)
Although I noticed the question yes no input which dialog thinks yes is 0 and zenity thinks the opposite is quite uncomfortable at least for me atm

Also whiptail sucks

Mizu_vz
Автор

Hello, i have a question. What command can i use if the user clicked on the cancel button and it must show a window with a message?

zineb
Автор

That's pretty cool! The problem is that it will randomly pop up in a different position of my screen every time I run it. Does anyone know how to fix it?

fabiano
Автор

Hi, is there an similar tool as zenity for MacOS?

SimoneAratari
Автор

How get the result of zenity --question --text="Are you OK?" pops up a dialog but where is the output? After pressing YES my terminal stays blank

Turjak_art
Автор

Hi, I need a little bit of I'm trying to write a bash script using zenity —password by assigning it a variable PASSWD but when I try to pipe it to a sudo command it says incorrect password attempt.... can somebody help?

PASSWD= "$(zenity --password --title="Authentication")"
echo $PASSWD | sudo -S mv $name.xml

suchintonchakravarty
welcome to shbcf.ru