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
41
votes
11 answers

What's the simplest cross-platform way to pop up graphical dialogs in Python?

I want the simplest possible way to pop up simple dialogs in Python scripts. Ideally, the solution would: Work on Windows, OS X, Gnome, KDE Look like a native dialog on any OS Require minimal code To pop up a simple standard dialog should require…
endolith
  • 25,479
  • 34
  • 128
  • 192
17
votes
1 answer

Control the size of the content in a zenity window?

I can control the size of a zenity window with the --width and the --height arguments: $ zenity --info --text="This is an information box." --width=600 --height=400 Is there a way to control the size of the content? For example, can I double the…
CW Holeman II
  • 4,661
  • 7
  • 41
  • 72
13
votes
3 answers

git stderr output can't pipe

I'm writing a graphical URI handler for git:// links with bash and zenity, and I'm using a zenity 'text-info' dialog to show git's clone output while it's running, using FIFO piping. The script is about 90 lines long, so I won't bother posting it…
Delan Azabani
  • 79,602
  • 28
  • 170
  • 210
13
votes
2 answers

In zenity forms, how can I set default values (initialize) entries?

I've got a zenity form working, but I can't find any information on initializing the entries. The Zenity help manual webpage doesn't address the issue. For example, the example from that webpage is #!/bin/sh zenity --forms --title="Add Friend"…
Leslie Turriff
  • 131
  • 1
  • 4
7
votes
2 answers

Bash, zenity progress bar without cancel

Currently developing a small bash script, my needs are a progress bar that doesn't come with a cancel button. I have been looking into the zenity progress bar, but haven't found a way to get rid of the cancel button. The non-existence of the…
Butch
  • 73
  • 1
  • 1
  • 3
7
votes
4 answers

How to send values to Zenity progress bar

I've written a simple script that uses 7zip to backup a directory. Everything works, but now I wanted to add some graphical feedback to it, adding a progress bar. I know that I can do this with zenity but, no matter what I try, I can't seem to make…
user1301428
  • 1,743
  • 3
  • 25
  • 57
6
votes
1 answer

Writing to stdin from PHP?

In linux I want to run a gnome zenity progress bar window from PHP. How zenity works is like this: linux-shell$ zenity --display 0:1 --progress --text='Backing up' --percentage=0 10 50 100 So the first command opens the zenity progress bar at 0…
hamstar
  • 1,787
  • 4
  • 16
  • 23
6
votes
0 answers

Zenity as a datetime picker

I see that zenity can pick calendar dates with the --calendar option. Is there a way to get it to prompt for a time too? I've looked through the manual and it seems like it doesn't. And if that's the case, does anyone know of a simple utility which…
wafflecat
  • 497
  • 1
  • 5
  • 13
6
votes
5 answers

How can my shell script control the placement of a zenity window?

I'm using zenity to post a simple notification when my spam-filter daemon filters a group of messages. Currently this message is posted to the middle of the screen, which is obtrusive. I want to post it to the upper left corner. However, zenity…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
6
votes
2 answers

Zenity --progress from Handbrake CLI output

My goal is to create a gtk progress bar with the output of HandBrakeCLI using zenity --progress. I've ran into some snags and I'm wondering if someone knows of a better way or can help me with what I'm currently doing. Normal Output: HandBrakeCLI…
Brad Carter
  • 61
  • 1
  • 3
5
votes
5 answers

What is the opposite of && in bash?

My bash script is zenity --question --text=Continue? && echo Continuing... How can I make it so it would echo Stopping if the user selected no? i.e.: zenity --question --text=Continue? && echo Continuing... !&& echo Stopping...
t3hcakeman
  • 2,289
  • 4
  • 25
  • 27
5
votes
2 answers

Message box close immediately after using py2exe

I use script: #!/usr/bin/python from uuid import getnode as get_mac import socket import requests import datetime import os def main(): print('start') i = datetime.datetime.now() #print ("Current date & time = %s" % i) headers =…
Michu93
  • 5,058
  • 7
  • 47
  • 80
5
votes
1 answer

How to show sftp progress

I have script that sftp files . i would like to display a progress bar showing the transfer of the files sftp -o StrictHostKeyChecking=no user@ftpsite.com << ! cd offload put /media/*/*.tgz |zenity --progress --auto-close bye
rchcoffey
  • 79
  • 1
  • 2
  • 8
5
votes
1 answer

Formatting piped text in zenity

I'm trying to show some mediainfo output in a Zenity dialog, using mediainfo 00000.MTS | zenity --text-info and here's there result. As the image shows, the text is badly formatted because of spaces, while it shows just right in terminal. Can I…
Wantoast
  • 55
  • 5
5
votes
2 answers

BASH - file selection by multiple patterns in zenity

Im pretty new to zenity and bash. Im trying to make file selection window that will display only the ones with .ogg, .aac and .wav extension. I tried this, but it doesn't work. option=`zenity --file-selection --file-filter=*.ogg | *.aac` For one…
user2171053
1
2 3
13 14