Pratikshinde55 / Zenity-GUI

Exploring Zenity: A Comprehensive Guide with Output Screenshots,

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zenity

Configuration of Docker and webser container using Ansible (3)

🌟 Zenity:

Zenity is a powerful command-line utility that allows users to create graphical user interfaces (GUIs) for shell scripts and terminal commands. In this blog post, we'll delve into the various options and functionalities offered by Zenity, accompanied by output screenshots for better understanding.

Zenity is a handy tool for enhancing the user experience of shell scripts by providing graphical dialogs such as message boxes, input forms, file selection dialogs, progress bars, and more. It simplifies interaction with users and adds a visual element to terminal-based applications.

⭐How to install and setup:

Here i use amazon cloud ubuntu ami and i used putty for ssh connection.(private-key amazon -->> .ppk )

💥On putty:

  1. In Session -->> Hostname: ubuntu@public_ip_of_instance -->> select ssh

  2. SSH -->> Auth -->> Credentials -->> private key file for Auth (same key of used for instance)

  3. SSH -->> Auth -->> X11 -->> Enable X11 forwarding

Screenshot 2024-04-02 173909

Note:

X11 server need on local window for allow display ,

If don't have then download "Xming" link for download-(https://sourceforge.net/projects/xming/) After download install and open onces, it can't open just click on open.

Note:

Also check SSH settings of instance , "/etc/ssh/sshd_config" in this folder allow "X11Forwarding yes". After that just restart sshd by using "systemctl restart sshd" command.

Installation:

1st need to update use follow command:

 #sudo apt-get update

install command for zenity on ubuntu:

 #sudo apt-get install zenity

Check zenity install or not:

 #zenity --version

💫magical display commands using Zenity💫

⚡Information Dialog:

       #zenity --info --text="Hello, World!"

zenity-1

⚡Warning Dialog:

       #zenity --warning --text="This is a warning message."

zenity-2

⚡Error Dialog:

      #zenity --error --text="An error occurred."

zenity-3

⚡Question Dialog (with Yes/No buttons):

     #zenity --question --text="Do you want to continue?"

zenity-4

⚡Input Dialog (for user input):

     #zenity --entry --text="Enter your name:"

zenity-5

⚡Password Dialog (for password input):

     #zenity --password --text="Enter your password:"

zenity-6

⚡File Selection Dialog (for selecting files):

   #zenity --file-selection --title="Select a file:"

zenity-7

⚡Calendar Dialog (for selecting a date):

   #zenity --calendar --title="Select a date:"

zenity-8

⚡Progress Dialog (for displaying progress):

   #zenity --progress --title="Progress" --text="Processing..." --percentage=50

zenity-9

⚡Color Selection Dialog (for selecting a color):

   #zenity --color-selection --title="Select a color:"

zenity-10

⚡Question Dialog with Custom Buttons:

   #zenity --question --text="Do you want to save your changes?" --ok-label="Yes" --cancel-label="No"

zenity-11

⚡Progress Dialog with Auto-Close:

   #(sleep 20; echo "100") | zenity --progress --auto-close --text="Processing..."

zenity-12

⚡♾️enity command that displays a "fortune" (random quote) in a dialog window:

here need 1st install fortune-mod on instance.

   #sudo apt install fortune-mod

zenity-13

zenity-14

every time new come up zenity-15

About

Exploring Zenity: A Comprehensive Guide with Output Screenshots,