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.

Zenity can be experimented with from the command line, and various formulaes tested; the simplest being something like:

zenity --entry 

which brings up a simple text entry box for the user to input a value which is then echoed to the terminal.

In scripts of all types (and not just bash or sh), it can be used for quite complex purposes. At sourceforge there is a site which holds a collection of user Nautilus scripts that make use of zenity's capabilities. A script by Martin Langasek, for example, uses zenity to prompt the user for a password when encrypting and decrypting files. It is available in the collection there.

For more information, see man zenity, or the Ubuntu man pages online.

123 questions
13
votes
3 answers

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" --text "${array[@]}" --text "Insert your…
jep
  • 448
6
votes
1 answer

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?" _ Full script #!/bin/bash if [ "$(whoami)" != "root"…
6
votes
2 answers

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 I can get this to work? I want to be able to do …
user36410
  • 319
3
votes
1 answer

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 have this #!/bin/bash duration=$(yad --title…
2
votes
0 answers

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 worked perfectly. Now, with Ubuntu 16.04, they…
luk3yx
  • 401
2
votes
1 answer

How can I insert an image with zenity?

I have tried --window-icon in zenity by giving the image path, but it is not working... The code I tried is: zenity --window-icon "/home/pavan/Downloads/badge.png" --title "Search Box" --text "Type to search.." --entry --width 2000 I also tried…
2
votes
1 answer

Auto adjust width and height in zenity

Do we have an option in zenity to auto adjust the width and height of the results window instead of manually specifying the values of height & width ?
Premchand
  • 21
  • 1
  • 4
2
votes
1 answer

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 isn't one. The actual "meaty bit" works…
user256787
  • 39
  • 1
  • 5
1
vote
1 answer

creating a popup that covers the screen

so I want to create a pop-up that covers the whole screen I have already had a look at zenity and it doesn’t really work
thatguy
  • 33
1
vote
0 answers

How could you password protect an application

How would you create A pop-up password dialogue using zenity (or other application) so that when a user tries to access a specified Applictaion it asks for a password
thatguy
  • 33
1
vote
2 answers

How do I use/bundle a custom version of Zenity in my script?

I'm writing a script using zenity. But zenity 3.4.0 has a bug (has been fixed in latest Ubuntu versions), it returns exit code 139 instead of 0 or 1. But I need to use it in scenarios where the bug is still there. So the solution is to bundle a…
satya164
  • 277
1
vote
1 answer

Running UCK causes zenity crashed

I was very satisfied with Ubuntu Customization kit on Ubuntu previous versions but with 12.04, it leads to crash zenity and disappear the GUI and nothing occur.I tried the old version of this package but the same result.Please help me.Thnx in…
beeju
  • 2,973
  • 4
  • 19
  • 22
0
votes
1 answer

Get path to folder using zenity

I found the zenity file path dialog but I how can I get the path to a folder? Any help is appreciated.
0
votes
1 answer

In 12.04, does zenity crash on you too?

When I run zenity --list --title=111 --column=222 --column=333 ab cd ef gh and select any line with a mouse (or keyboard) and then click on "Ok", I got: $ zenity --list --title=111 --column=222 --column=333 ab cd ef gh ef Segmentation fault (core…
sup
  • 4,862
-1
votes
1 answer

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 --iface ppp0 -s | sed '1,6d' | head -n1 | awk '{…
Rosika
  • 575