Questions tagged [zenity]

Zenity is a tool that will display Gtk+ dialog boxes from the command line and through shell scripts. It is a rewrite of gdialog, the GNOME port of dialog.

75 questions
11
votes
3 answers

Keep a Zenity dialog box always-on-top in foreground

Is there a way to detect that a Zenity dialog has lost focus? I would like to keep the dialog box in the foreground unless the user presses ESC. I am attempting to add it to this script: #!/bin/bash # requires these packages from ubuntu…
rubo77
  • 27,777
  • 43
  • 130
  • 199
8
votes
5 answers

Zenity dialog windows have excessive height and cannot be resized. Bug workaround anyone?

I'm trying to do some things in zenity, and it's been driving me bonkers. To illustrate my problem, try running this: zenity --info --text "Hello there friends." Simple enough right. Now try this: zenity --info --text " Hello there friends. Hello…
MountainX
  • 17,168
  • 59
  • 155
  • 264
7
votes
3 answers

How do I create a dialog with multiple text fields using zenity?

I want to crate a GUI for some command line programs and I need to get info from multiple text fields e.g. 'Username', 'Password' and a checkbox 'Sign automatically?'. I need to set particular variables in my script equal to the respective text…
Ufoguy
  • 1,210
  • 3
  • 13
  • 21
5
votes
3 answers

How can I change Zenity dialog icon?

I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap From above Line I succeed To remove default icon, But I…
AlphaCoder
  • 163
  • 1
  • 3
  • 8
5
votes
1 answer

dialog or zenity?

I am working on a project. I have two options for the GUI part. Either use dialog or zenity. I never used any of these tools before. I have to learn one of them. Suggest me which one should I learn and which will be more beneficial to learn? Which…
Chankey Pathak
  • 1,833
  • 8
  • 27
  • 35
5
votes
1 answer

How do I safely get multiple filenames from Zenity?

Zenity can be used to create a file selection dialog and select multiple paths. The separator for paths is specified using the --separator option. Therefore we can't use NUL, the only safe character for delimiting filenames. So, aside from multiple…
muru
  • 69,900
  • 13
  • 192
  • 292
4
votes
1 answer

zenity --notification: "Do default action" button

If I use the example usage command for notifications from the Zenity documentation site: zenity --notification\ --window-icon="info" \ --text="There are system updates necessary!" I get a notification with a button at the bottom saying "Do Default…
Matt_M
  • 63
  • 1
  • 7
4
votes
2 answers

GTK: Specify application foreground and background color on command line

In the old days, all X11 applications would take standard command-line arguments to specify things like foreground/background color. Is there a way to do that today for GTK applications? In particular I'm interested in controlling the colors of…
BobDoolittle
  • 1,607
  • 15
  • 26
3
votes
4 answers

How to display a (zenity/GUI) dialog to the user after a root cron task has completed

I have a simple periodic cron task that must run as root. I want to use Zenity (or similar) to display a GUI informational dialog to user 1000 (or logged in user or all users) when the cron task finishes. I'm looking for a simple, easy, quick…
MountainX
  • 17,168
  • 59
  • 155
  • 264
3
votes
2 answers

Wait until md5sum command is completed

#!/bin/bash cd /path-to-directory md5=$(find . -type f -exec md5sum {} \; | sort -k 2 | md5sum) zenity --info \ --title= "Calculated checksum" \ --text= "$md5" The process of a recursive checksum calculation for a directory takes a while. The…
stewie
  • 45
  • 4
3
votes
2 answers

Zenity Cancel button for GNU parallel progress bar

As GNU parallel's manual shows, you can use a zenity progress bar with parallel: seq 1000 | parallel -j30 --bar '(echo {};sleep 0.1)' \ 2> >(zenity --progress --auto-kill) | wc However, in that example, the cancel button doesn't work. I've read…
3
votes
2 answers

How to pass data outside process for zenity progress?

Usually this would be a question about how to pass data from a subprocess to a main process, but maybe zenity has some extra quirks so please focus on zenity. Example: #!/bin/sh ( echo "10" ; sleep 1 echo "# Updating mail logs" ; sleep 1 echo "20" ;…
greenoldman
  • 6,086
  • 16
  • 54
  • 65
3
votes
1 answer

How to get the line number of a Zenity selected Item

Can someone tell me how to calculate the line number of a selected item. I would like to have the specific line number to refer to a subroutine that will process the same line of a different file. #! /bin/bash item=$(zenity --list "Apples"…
L. D. James
  • 1,584
  • 2
  • 11
  • 19
3
votes
1 answer

If command reach timeout execute other command

I'm trying to set up a script for my school's computer that switches them off automatically at the end of the day (since most teachers forgot them on). I thought to send a zenify warning box to inform the user that the PC is going to switch off and,…
Giulio
  • 33
  • 1
  • 5
1
2 3 4 5