Questions tagged [zenity]

Zenity is free software and a cross-platform program that allows the execution of GTK+ dialog boxes in command-line and shell scripts.

198 questions
5
votes
1 answer

Redirect output of command with heredoc

I have a command like this: sftp user@host <
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
4
votes
2 answers

Make script terminate when background zenity dialog is closed

I have written a fairly simple script here that is meant to display a text info dialog using zenity and continuously read data from a remote TCP connection and display it in the dialog. This works... However I would like for the entire script to…
Drew Chapin
  • 7,779
  • 5
  • 58
  • 84
4
votes
1 answer

how to get the values of different forms in zenity

I want to get the values of the form in zenity (Ipaddress value written by user) in order to do some video streaming with ffmpeg, I tried several examples such as lists, forms, .. etc zenity --forms --title="Add Friend" --text="Enter Multicast…
user573014
  • 715
  • 3
  • 15
  • 30
4
votes
1 answer

awesome wm: pop yes/no dialog when killing a window

In awesome wm when I press mod-q I kill the current window. I would like to pop a yes/no dialog to confirm the action: if zenity --question --title='Quit?' --text='Quit?'; then kill_the_window; fi But, the killing function is run from the Lua code…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
3
votes
1 answer

Bash script not working when run outside terminal

This script does not function properly when launched graphically (by double clicking script icon and selecting run), however, runs just fine if called from the terminal; will not save a file or load contents from an existing file. Please help! Thank…
Sharon
  • 101
  • 1
  • 5
3
votes
1 answer

In Python 3.5, can't import zenity

Python 3.5.2, Mint Linux 32-bit. I've followed the documentation here -- https://pypi.org/project/python-zenity/#example -- and tried variations thereof, BUT cannot import the zenity library into Python 3. pip3 search zenity RESULT: python-zenity…
RBV
  • 1,367
  • 1
  • 14
  • 33
3
votes
0 answers

Zenity - Press OK with Enter in forms

I'm trying to make a simple reminder timer like this: #/bin/bash STRING=$(zenity --forms --title="$OPTION" --add-entry="Enter timer duration: (3600s = 60m = 1h)" --add-entry="Remind me about: ") TIMER=$(echo $STRING | cut -d"|" -f1) REASON=$(echo…
3
votes
2 answers

Default value in zenity field

I am trying to create a pop up window with zenity to get some inputs from the user. parameters=$(zenity --forms --title="Add Parameters" --separator="," --add-entry="Dimensionality" --add-entry="float" --add-entry="Interpolation"…
Christos ZS
  • 109
  • 2
  • 11
3
votes
3 answers

zenity dialog window with two buttons but no text entry

I would like to create a zenity dialog window with two buttons as only user input. The following creates a window with two buttons but with a space for a text entry zenity --entry --title="" --text "Choose A or B" --ok-label="B"…
Remi.b
  • 17,389
  • 28
  • 87
  • 168
3
votes
2 answers

How to grep a string in until loop in bash?

I work on a script compressing files. I want to do an 'until loop' til' the content of variable matches the pattern. The script is using zenity. This is the major part: part="0" pattern="^([0-9]{1}[0-9]*([km])$" until `grep -E "$pattern" "$part"` ;…
Nojas
  • 63
  • 1
  • 2
  • 7
2
votes
2 answers

Running command while zenity dialog box is shown in bash

I want to show an info box, or a general message, while running a command in background but i can't find an option to do so with zenity. Is it possible in the first place? An example would be this, for better explanation #!/bin/bash zenity --info…
user872015
2
votes
1 answer

Assigning output of zenity to a variable

I have a script that makes a GUI list here: zenity --list --text="Choose action" --column= --hide-header opt1 opt2 opt3 How can I make this output be assigned to a variable?
t3hcakeman
  • 2,289
  • 4
  • 25
  • 27
2
votes
1 answer

Why can't I use this text from zenity to find files?

I want to use the zenity text input for file selection so i can just drag and drop. Seems like it should work but doesn't. When I drag in a file it doesn't find it, but the path and file name seem correct. The "cut" is to remove the leading "file:/"…
Elrik
  • 25
  • 5
2
votes
3 answers

Updating content of a zenity window

I'm trying to making a small monitor to a program called showbf that print an updating itself every a certain amount of time. my best try is the following ssh user@server.foo "exit" if [ $? -ne 0 ] then ssh-add < /dev/null fi while…
Salvatore
  • 21
  • 1
  • 3
2
votes
0 answers

RHEL - zenity: needing to use options with only one button and scrollbars at same time

I need to show a text and by using "zenity --text-info" I guess it is the best approach. But I don't realize why zenity thinks I would need two buttons just to show a paragraph <= Actually, I don't ! => Then I tried with "--warning" or "--info"…
nlarralde
  • 27
  • 6
1
2
3
13 14