DEV Community

Cover image for Zenity And How to use it ❓
Sudhanshu tiwari
Sudhanshu tiwari

Posted on • Originally published at linkedin.com

Zenity And How to use it ❓

Zenity is simple yet useful tool in Linux by which we can make pop on-screen using various commands .

You can read the zenity manual by using

man zenity
Enter fullscreen mode Exit fullscreen mode

the command in the terminal your screen will look something like the below picture !

img

We have to use the below syntax to use the zenity commands !

zenity --[Command]
Enter fullscreen mode Exit fullscreen mode

How to pop out something on-screen using Zenity ?🤔

We can do this using

zenity --info --text=<text>
Enter fullscreen mode Exit fullscreen mode

img2

What if we want to change the title of the pop-out ?😁

Now ,we will use the title command

zenity --info --title=<title_text>
Enter fullscreen mode Exit fullscreen mode

img3

How to take input ?

By using the

zenity --entry 
Enter fullscreen mode Exit fullscreen mode

img4

Let's add title and info text to the pop out !

we are gonna use the --entry,--title, and --text command to do this

zenity --title="Title" \
--entry --text="Text is changed !" 
Enter fullscreen mode Exit fullscreen mode

img5

With the help of the zenity we can create notifications we can use various commands to create beautiful popouts,notification we can change the colour of text and etc .

More useful commands from the

zenity --help
Enter fullscreen mode Exit fullscreen mode

img6

To know more about zenity just explore the zenity : )

zenity --info --text="Hope you like my work : )"

Top comments (0)