Shell script – Zenity list dialog tutorial

July 5, 2014 | By | 2 Replies More

On this Shell script tutorial, I am going to learn how to show a list dialog using Zenity. Zenity list dialog provide an interesting way to show a list box/list dialog using Shell script. See the example below:

Create a new file

[codesyntax lang=”bash”]


Insert the following lines

[codesyntax lang=”bash”]


Then save it and make it executable then, run it.

[codesyntax lang=”bash”]


The code above will list any files with DEB extension under /home/dhani/Downloads directory.

zenity list dialog 1

When you click a DEB file from the list and press OK, it will display an info dialog.

zenity list dialog 2

When OK button pressed without selecting any file, it will show

zenity list dialog 3

Thank you see you on the next Shell Script tutorial.

Tags: , , ,

Category: Script

Comments (2)

Trackback URL | Comments RSS Feed

  1. geinux says:

    What theme do you use on the desktop?

Leave a Reply