The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 4,968β€…    Votes:  7β€…
Tags: command-line   button   zenity   yad  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

Title: Avoid showing cancel button on dialog
ID: /2019/10/16/Avoid-showing-cancel-button-on-dialog
Created: October 16, 2019    Edited:  June 12, 2020
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

Relabel Zenity Cancel button

You can relabel the button but you can’t remove it:

$ zenity --list --cancel-label="Go Back" --column="Column 1"

Will give you:

zenity cancel relabel.png

YAD (Yet Another Dialog)

Both yad and zenity allow you to use GUI dialog boxes from a bash script or the shell command line. Yad surpasses Zenity in every department though:

sudo apt install yad

Works in all distros.

Yad Progress bars

yad progress bars.png

You can define multiple progress bars in yad where zenity only offers 1. You can also include scrolling text.

Yad buttons

yad buttons.png

You can assign any text you want to any button. Also notice you can include a Window icon too.

Yad text entry

yad text entry.png

Yad displays text for you to change. Zenity cannot display existing text you can only enter new text.

Yad support

The author of Yad and many more contributors answer your questions in google groups. I’ve posted four or five questions about advanced functionality and usually get an answer within 24 hours. Not to mention enhancements are provided through the same channel.

⇧ Is a for loop using arrays better than using field splitting on a simple variable? Can I connect two external monitors on one USB-C port  β‡©