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.
122
questions
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=&...
22
votes
1
answer
7k
views
How can I create a wget GUI with multiple progress bars?
I'm writing my own script to download multiple items (simultaneously, one item per command) using wget and I need a progress bar. I currently utilize zenity --progress for my progress bars, but the ...
13
votes
3
answers
14k
views
How to call zenity from cron script?
Example script error.sh:
#! /bin/bash
zenity --error --text='Something very bad has happened!'
My incron-config:
~/Documents IN_MOVED_TO ~/scripts/error.sh
If I run error.sh in terminal GUI ...
13
votes
4
answers
14k
views
Zenity and text formating
I just discovered that zenity support html tags.
zenity --error --text "hello <b>world</b>"
but how to make it work with entry type ?
zenity --entry --text "hello &...
13
votes
3
answers
9k
views
Where's documented combo box usage with zenity?
I found by chance it was possible to display a combo box with zenity (version tested: 2.32.1). See the following code:
#!/bin/bash
array=(a b c d e)
value=$(zenity --entry --title "Window title" --...
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 ...
8
votes
2
answers
6k
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 ...
7
votes
2
answers
12k
views
How to use zenity file selection
I am new to zenity and I am trying to make a simple script for loading a file using zenity --file-selection and the wc command to get the word count of that file. I have successfully made a form which ...
7
votes
2
answers
8k
views
How to load a `zenity` List Dialog with space-embedded data from `ls`?
I'm having problems loading a zenity List Dialog when the data contains spaces.
It is straight-forward when there are no spaces in the listed data,
but I don't know of a simple/standard method for ...
7
votes
4
answers
15k
views
How can I easily create a GUI dialog with a bash script?
I need to present some text along with the items(about 15 values) for each of two Bash list(file) records. On the same screen I need to present a three way selection, (buttons, scrolled selection ...
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 - ...
6
votes
1
answer
13k
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?"
_
...
6
votes
1
answer
5k
views
Confirm shutdown with Zenity?
I got this command which enables me to shutdown Ubuntu 13.10 directly from the keyboard (without needing to open a terminal and running something like sudo shutdown -h now):
dbus-send --system --...
6
votes
1
answer
8k
views
youtube-dl file download progress with zenity progress bar
How to add youtube-dl file download progress percentage to zenity progress bar
sample code (just an example, not a working one)
#!/bin/sh
(
progress=$(youtube-dl --extract-audio --audio-quality 0 ...
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 ...
6
votes
1
answer
1k
views
Reliable alert dialogs from the shell
I'd like to have a message pop up in response to various system events, mostly in order to be able to set reminders for myself from a shell session. There are a few ways to do this; zenity seems to ...
6
votes
2
answers
4k
views
zenity window on top
I would like the window produced by zenity to be configured so it is always on top. There does not appear to be an option to enable this. Can someone suggest a source change to the zenity code so that ...
5
votes
2
answers
1k
views
Add unity quicklist launcher with a zenity command
I try to add a quicklist launcher for gedit that allowed me to open a new doc in gedit directly from unity dash
so I tried to add this command to my OpenDoc Shortcut Group
[OpenDoc Shortcut Group]
...
4
votes
2
answers
16k
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 ...
4
votes
1
answer
911
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/...
4
votes
1
answer
795
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.
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
...
4
votes
2
answers
272
views
Looking for a customizable "Did you know..." dialog application
I want to deploy a "Did you know..." or "Tip of the day" application at the office. It should:
Show a dialog at login time with a random tip.
Obviously, provide some way to store my own tips.
Be ...
4
votes
1
answer
8k
views
How do I create a popup banner before login with Lightdm?
When Ubuntu was using gnome I was able to create a popup banner like the banner below before the login screen using zenity in the /etc/gdm/Init/Default. The line of code would be like this:
if [ -f "/...
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/...
4
votes
2
answers
862
views
Simple Zenity script - to select icon?
I am trying to make a simple graphical Zenity+Bash script that will list all the icon themes available in /usr/share/icons, then let the user select one and click "OK" to replace gtk-icon-theme-name="...
4
votes
1
answer
819
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....
4
votes
1
answer
4k
views
How to use a zenity progress bar with cclive
I tried to use a zenity progress bar with cclive. I'm writting a script to download web videos files and I wanna see the progression of the download.
But when I try something like
$cclive <url> ...
4
votes
1
answer
14k
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 ...
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
3
votes
2
answers
1k
views
Can a Zenity list display a string `--option`?
Is it possible to have a Zenity list-style menu show a code option like -r?
I am trying to make a simple GUI for an FFMPEG bash script. This is just one prompt for selecting a framerate for a video. ...
3
votes
2
answers
2k
views
Why does a bash-zenity script has that title on Unity Panel and that icon on Unity Launcher?
I have this small bash script which helps use Infinality font rendering options via a more user-friendly Zenity window: http://gnomefiles.org/content/show.php/Infinality+Style+Changer?content=161984
...
3
votes
2
answers
7k
views
Zenity progress bar and output
I wrote this little script:
response=$(process ...) | zenity --progress --pulsate
echo $response
I want read the response of the process, whatever it is, and show a pulsating progress bar in the ...
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 ...
3
votes
3
answers
2k
views
Get variable from Zenity list generated from .csv file
I'm trying to get the value from zenity list. But it doesn't work. Some help would be nice :)
If I remove the ans=$ I get the value from zenity in terminal like this:
10.33.54.13|10.33.54.13
But ...
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 ...
3
votes
1
answer
1k
views
Every time I connect to the internet zenity says "downloading wine-unity3d-installer"
Every time I connect to the internet Zenity flashes that little popup for about a second (because the download is apparently 1 mb) a couple of times. First of all, why does it keep installing the same ...
3
votes
1
answer
4k
views
How do I set a click action on zenity --notification?
Running
echo "message:hi" | zenity --notification --listen
I can click the bubble and it disappears. The zenity program keeps running until I Ctrl-C. Is there a way to "catch" the click and make ...
3
votes
1
answer
103
views
Is there an application to create windows with messages?
I want to do something to create a window, preferably marked as on-top, with a configurable message. Is there an Ubuntu package for that?
The idea to put the relevant command inside a script:
#!/...
3
votes
1
answer
2k
views
Printing Checks from CLI or GUI
Looking for a program or a way to print onto my bank checks in Ubuntu. I don't want to use GNUCash or KMyMoney as those are bank register program's and it's too much work to open one of those each and ...
3
votes
1
answer
341
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 ...
3
votes
1
answer
205
views
insert $duration variable inside another line of code in a sh file
I found out about byzanz-record which can record your desktop and get the result as a gif, flash or other, I want to make a GUI for personal use but I can't seem to get it working up until now I only ...
2
votes
2
answers
7k
views
Getting window-icon to work with Zenity
I am having a weird problem with Zenity. I've never used Zenity before, so this could be a mistake. If I type the command zenity --question --text=QUESTIONGOESHERE --window-icon=/some/path/to/64x64/....
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="...
2
votes
1
answer
13k
views
Store the return string to a variable from zenity
I am using Zenity tool to pop-up an entry dialog box. But how can i store the value entered into the text box to a variable ? Now, the string is being printed onto the console itself. I want it to be ...
2
votes
1
answer
557
views
zenity script for zsync
Can someone make a simple zenity script for zsync which just takes the location of the file to be synced and the zsync file and show progress ?
2
votes
2
answers
3k
views
Is Zenity progress bar affecting variables
Hi guys I am currently trying to implement zenity progress bar to my while loop, however I noticed that my variable which are meant to be incremented did not increment. Here is a sample test script I ...
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?...
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 ...
2
votes
1
answer
498
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 ...