Skip to main content

Questions tagged [zenity]

Zenity is a program often used in scripts to display graphical boxes that very often prompt for user input. It is a rewrite of the old, but still used gdialog program, and has a 'gdialog wrapper script' so that it can be used in older scripts.

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

Mark previous notification from list as read?

I am running a service that will notify as frequently as every 5 minutes on condition. These notifications are important, but in addition to every popup, I only ever want to see the most recent ...
saltyeggs's user avatar
4 votes
1 answer
903 views

I need a zenity progress bar using the output of shred

I want to use the output of shred to make a progress bar with zenity. My shred command looks like this. sudo shred -vfn 1 /dev/sda I am new to Linux. So I probably miss an obvious solution.
BlackRed's user avatar
1 vote
2 answers
1k views

How to show "live" progress of ffmpeg process with zenity (or yad, or kdialog)?

I have a script to cut/trim media files - initial details here and here; after some more recent adjustments adjustments it looks like this: #!/bin/bash INPUT=$1 eval $(yad --width=400 --form --field=...
cipricus's user avatar
  • 3,724
0 votes
0 answers
394 views

gnome-terminal and zenity will not install

I was tasked to update an nvidia jetson nano from Ubuntu 18 to 20.04. I followed this (https://qengineering.eu/install-ubuntu-20.04-on-jetson-nano.html) guide step by step, but while I was following ...
Phar's user avatar
  • 1
1 vote
1 answer
740 views

Is there a way to keep Zenity open after preforming my shell script?

I have made a zenity list that opens up the terminal to run a shell script but after it is ran zenity closes is there a way to keep zenity from closing? Here is my script - #!/bin/bash zret="$( ...
LiamP's user avatar
  • 11
0 votes
1 answer
321 views

I need help trying to make a functional Zenity list

Here is what I have so far #!/bin/bash zenity --list --title "Packages" --list --text "select packages you want to install" --checklist --column "id" --column "...
LiamP's user avatar
  • 11
0 votes
1 answer
79 views

Linux: How to capture sheduled shutdown datetime and display it on Zenity Window?

Using a script I want to display my system's scheduled shutdown datetime on a Zenity window on the desktop. The following code displays the scheduled date and time formatted. I want to take that date ...
ThN's user avatar
  • 223
2 votes
2 answers
2k views

How to interact with zenity window and type some text inside it?

I have python code : import subprocess subprocess.call(['sh', './zenity.sh']) and zenity.sh file which is #!/usr/bin/python zenity --forms --title="Question" \ --add-entry="...
ranger's user avatar
  • 131
9 votes
1 answer
3k views

How to prevent Microsoft Teams "Allow settings change?" dialog on startup?

I am using Ubuntu 20.04 and I've installed Microsoft Teams using Ubuntu Software. My problem is that I am always getting this annoying dialog when starting teams. I said yes and no many times. No ...
Alwin's user avatar
  • 383
-1 votes
2 answers
2k views

Cancel zenity button usage

so a pretty straight forward question , on zenity theres is 2 buttons on each page , ok and cancel . with my script i manage to assign the zenity code to a variable where i can pick a date for my ...
Justin Mayer's user avatar
1 vote
1 answer
1k views

Text Entry in Zenity

I am trying to do a delete function inside a zenity entry box . I would like to know how can I store the path given by the user inside the entry box in a variable or how can I use it . Thanks. here is ...
Justin Mayer's user avatar
0 votes
1 answer
1k views

zenity file-selection how to get list items as you choose

I have a bash script that use zenity as GUI. I need to get a list of files in the same order as I select them. I use --file-selection option and working fine but it put in the output variable always ...
emilio defranco's user avatar
2 votes
2 answers
2k views

How can I use following password-prompting dialog from shell? (GNOME)

How can I trigger above dialog from a shell script which needs to prompt for a password? I already encountered and use zenity for that purpose, though I like the former more for aesthetic reasons (...
bela53's user avatar
  • 151
0 votes
0 answers
100 views

Why does Zenity list kernels to remove, which it cannot find?

I am trying to use Zenity to remove old kernels (disk space issue), as described by WinEunuuchs2Unix on Mar 11, 2017 (and follow-ons). Zenity lists kernels that it says can be removed. For example, ...
DrTSPC's user avatar
  • 67
0 votes
2 answers
1k views

18.04: Run zenity in background or not show the terminal

A .desktop file runs some dialog boxes using zenity (more) on an Ubuntu 18.04 system. I want just the zenity dialog boxes to come up, not the terminal. I've tried setting the Terminal tag to false and ...
Ametz's user avatar
  • 1
1 vote
1 answer
3k views

Cancel buttons Zenity

So, I have this script: #!/bin/sh #InputBox1Test title=$(zenity --entry --text 'Type what you want your Notification Title to Say!' --title 'Notification') text=$(zenity --entry --text 'Type what ...
Zany_Zachary1's user avatar
0 votes
2 answers
2k views

I need help with zenity to list files

I have the command sudo find / -size +450M -exec ls -lhGSr {} \; to find and list files greater than 450M. I know how to display the output in zenity, but I'd like to select a path (any) in zenity ...
vladimir pavloski's user avatar
0 votes
1 answer
258 views

Package to install bash script that needs root/sudo access

Is there a way to create a Snap/Snapcraft or Debian package that could install a bash script as an "application" with an icon in the Dock--specifically, one that needs to be run as root in order to ...
Jeff Billings's user avatar
1 vote
1 answer
4k views

How to put YAD form fields value into variable after submit?

How to put YAD form fields value into variable after submit? My script actually looks like this: #!/bin/bash default_jpg='/'; default_mp3='/'; default_resolution='1920:1080'; default_filename="/"; ...
RE666's user avatar
  • 21
4 votes
1 answer
906 views

How do I get a Zenity feature in Yad?

I have the following twenty-six files in a folder: $ ls a.txt c.txt e.txt g.txt i.txt k.txt m.txt o.txt q.txt s.txt u.txt w.txt y.txt b.txt d.txt f.txt h.txt j.txt l.txt n.txt p....
DK Bose's user avatar
  • 43.5k
2 votes
1 answer
524 views

Zenity progress: no window

Bit of a noob question, I know... I want to batch convert my videos to h265, which I can do with the help of Zernity and ffmpeg, but I'm having a little problem with the progress bar, in that there ...
user256787's user avatar
8 votes
2 answers
7k views

Avoid showing cancel button on dialog

I'm using Kubuntu 18.04 with: $ zenity --version 3.28.1 I want to display a --list dialog with zenity, but I don't want to show the Cancel button (in fact I'm okay if there is no OK either). It ...
Bakuriu's user avatar
  • 642
0 votes
1 answer
90 views

How do I suppress Zenity dialog pop-up when starting Jupyter Notebook? [closed]

When I launch Jupyter Notebook from terminal, a Zenity notification window pops-up saying: Allow opening file? Allow snap "jupyter" to open file "/run/user/1000/snap.jupyter/jupyter/nbserver-5664-...
Giulia Savorgnan's user avatar
0 votes
2 answers
501 views

It is possible to add password show in zenity linux

It is possible to make zenity dialog with password show button or something like this ?
Javila's user avatar
  • 51
3 votes
1 answer
2k views

How to display a value with zenity?

I'm trying to calculate Euler's numb. but I'm having problems trying to display the result. This is what I have: #Using a switch an case "Euler's Number") szAnswer=$(zenity --info --text "Enter a ...
escobarveras's user avatar
0 votes
1 answer
1k views

zenity window is not shown when called from `at` command

Calling zenity command shows an alert window, as expected: zenity --info --text="test" But calling zenity with at does not show the alert window, at the specified time: echo "zenity --info --text=\"...
Marinos An's user avatar
4 votes
1 answer
953 views

Zenity: get selected filename without its path

I need zenity to put a selected filename into a variable without its path. What I have now is file_to_copy="$(zenity --file-selection --title='Select a File')" echo $file_to_copy then prints /home/...
blades's user avatar
  • 85
1 vote
1 answer
2k views

How to detect if the user has clicked on "Quit" in a zenity list

This is my code: while true; do choice=$(zenity --list --text "Users are listed below." --title "Result" --ok-label="Back to Menu" --cancel-label="Quit" --column=Users $(cut -d : -f 1 /etc/passwd)...
Arman Malekzadeh's user avatar
-1 votes
1 answer
2k views

zenity --notification: additional button

I´ve got a question regarding zenity. What I want to do is display my total data usage of my web-stick for the current day in a message box. I found a solution using notify-send: set name ( vnstat --...
Rosika's user avatar
  • 585
2 votes
1 answer
2k views

Bash one-liner to display ALL `gsettings` in GUI dialog window

Recently I've been encountering many questions in Ask Ubuntu that require changing gsettings to solve the problem. For example this question: How to prevent shutdown when one of two batteries is empty?...
WinEunuuchs2Unix's user avatar
3 votes
1 answer
5k views

Zenity multi-choice from keyboard

I was looking for a zenity script that would offer choice between multiple commands (logout options, programs). Looking at the script discussed here (that uses the --radiolist option) I have noticed ...
user avatar
3 votes
1 answer
363 views

Using wmctrl with zenity prompt causes budgie-wm segmentation fault [closed]

I'm attempting to write a bash script that switches between workspaces with some dialog prompts along the way. I'm running Ubuntu 17.04 with Budgie remix. When using wmctrl or zenity separately, they ...
Tom's user avatar
  • 188
4 votes
2 answers
17k views

How to make a progress bar work in Zenity?

I am writing a simple basic bash script (starting with #! /bin/bash, file format is .sh) and I am trying to make a progress bar work: #!/bin/bash echo "You are running in LXDE mode. Answer 'yes' or ...
na-no.'s user avatar
  • 846
0 votes
1 answer
3k views

Zenity remote display text issue

When i run command: ssh user@host "zenity --warning --width=500 --no-wrap --text="Your $VPN is not connected. Please connect it or inform to engineer" --display=:0" If I use single quote then it ...
d a i s y's user avatar
  • 5,531
6 votes
1 answer
14k views

Zenity question - how can I use user input?

I want to make a zenity question that goes further depending on the answer you choose. The question in my script is: zenity --question --text="Would you like to participate in a little form?" _ ...
EraySP909's user avatar
6 votes
3 answers
6k views

How to make zenity "transient parent" warning disappear permanently [duplicate]

Zenity annoys me by always displaying the warning in terminal: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. Apparently I'm not the only one: linuxquestions.org - ...
WinEunuuchs2Unix's user avatar
6 votes
1 answer
4k views

Bash template to use zenity (or yad) to insert / edit / delete records in a file or database

I’m looking for a bash template that uses zenity or yad to maintain a list of records. The template could be a shopping check list with print option or it could be a list of servers to monitor ping ...
WinEunuuchs2Unix's user avatar
4 votes
2 answers
3k views

How to edit YAD question labels (example)?

YAD is a Zenity fork. I have this yad script: #!/bin/bash yad --text="Execute the file? (press 'Cancel' to open in text editor)" case $? in 0)thunar "$1" ;; 1)gedit $1 ;; esac ...
user avatar
1 vote
2 answers
5k views

Zenity script: dismiss window with close (x) button or Esc

Following this solution I have a zenity script to ask me what to do when clicking an executable script in Thunar or a desktop file in Pantheon Files: #!/bin/bash zenity --question --text="What ...
user avatar
4 votes
2 answers
1k views

Using Zenity to maintain configuration file

I need to setup a configuration file in Bash and believe Zenity is the best method but am having problems finding a link using google with a suitable example. So far my code looks like this: #!/bin/...
WinEunuuchs2Unix's user avatar
1 vote
2 answers
352 views

Enter GPG passphrase with Zenity GUI enviroment

I am working about a Zenity GUI based GPG application. But I have a problem with that. GPG ask passphrase for encryption in terminal with this command gpg -c $FILE. However users must enter their ...
astronaut_cat's user avatar
3 votes
2 answers
9k views

pipe stdout to zenity notification

I would like to pipe the stdout of shutdown -P +60 to zenity --notification. But this does not work: sudo shutdown -P +60 | zenity --notification
user avatar
0 votes
1 answer
2k views

Get path to folder using zenity [duplicate]

I found the zenity file path dialog but I how can I get the path to a folder? Any help is appreciated.
cataclysmic's user avatar
4 votes
1 answer
15k views

How do i Create a Zenity form with a check list in it

I am trying to create a small GUI in Zenity, for it i a few text inputs coupled with a checklist. It seems however the only list i can add to a form is a list of fixed values, and not one with ...
rasmus91's user avatar
  • 198
0 votes
0 answers
49 views

Detect cancelling zenity when script is run as sudo [duplicate]

I use Ubuntu 14.04 and have a simple script: OUTPUT=$(zenity --forms\ --title="new"\ --text="Add new"\ --separator="," \ --add-entry="path"\ ) accepted=$? if ((accepted != 0)); then echo "...
hasanghaforian's user avatar
2 votes
0 answers
101 views

How to resume zenity list after picking choice?

I have a zenity list whose entries call different scripts. Among them there is a scripts which concatenates all the results from other scripts. I would like to recall this script so I can save what I ...
user1463152's user avatar
24 votes
4 answers
40k views

error message when running zenity under 16.04: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged

Under ubuntu 16.04 I get the following message Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged when I open zenity with the command zenity --text-info --filename=&...
Leo Simon's user avatar
  • 1,539
0 votes
1 answer
2k views

Zenity list dialog from variables

I have a bash script which looks like this: column_names="--column=\"TargetDir\" --column=\"TargetPage_ID\" --column=\"TargetTitle\"" row="\"Target Dir 1\" 1 \"TargetTitle 1\"" echo "column_name is: ...
hasanghaforian's user avatar
2 votes
0 answers
780 views

Zenity windows are no longer the same size

Lately, I have been using zenity with a progress window, and opening questions with the same size on top of the progress window, to hide it. With Ubuntu 14.04, they were exactly the same size, and it ...
luk3yx's user avatar
  • 401
2 votes
1 answer
1k views

zenity list in forms dialog is not viewable

What I am trying to do is this: zenity --forms --add-list my_list --list-values="one|two|three" What I get is this: That white line in the center is the list , which for some reason has no width ...
Sergiy Kolodyazhnyy's user avatar