Shells scripting – How to create GUI dialogs for GNOME and KDE?

I love scripting and when you have GUI utilities to create a dialog box from scripts, it makes your life easy.

Zenity and KDialog tools allow you to create GNOME- and KDE-specific front ends for scripts.

FTA, “…Because Linux developers have made great strides in improving Linux’s desktop interfaces and GUI applications, users have had no reason to focus on the command line. New users especially tend to be wary of the command-line interface (CLI) and favor the graphical environments (GUI) …

Read more at Linux.com

For example consider following small command:

$ zenity –info –text “Welcome to nixCraft weblog” –title=’Hi there!’

Output:

Pretty easy eah? 😉

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Linus Dec 16, 2011 @ 14:56

    use this parameter

    –display=DISPLAY

  • Francis Aug 26, 2008 @ 5:09

    im getting following error message

    (zenity:14884): Gtk-WARNING **: cannot open display:

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.