Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Zenity --auto-kill is not working on a ghostscript process

I'm with a problem with the --auto-kill zenity option, which function is, according to zenity --help-progress, used to kill parent process if Cancel button is pressed. That's what I need in this line: ...
samueldelorenzi's user avatar
0 votes
0 answers
96 views

How to print stream of stdout to a window using zenity or yad?

Tools like zenity and yad are gtk-based dialog makers used to create user-interfaces from shell scripts. How to print the live stream of the output of piped commands to a window using those tools? I ...
Zeta.Investigator's user avatar
0 votes
0 answers
74 views

How can I create a Zenity dialog in a Zenity progress dialog?

I want to create Zenity dialogs in a Zenity progress dialog, but doing so shows the following error. You must specify a dialog type. See 'zenity --help' for details GDBus.Error:org.freedesktop.DBus....
Amir Samir's user avatar
1 vote
1 answer
97 views

Allow a sudo sub process to update Zenity running as original user

A script run by user 'staffer' runs zenity --progress. It then calls sudo -u adminBod adminScript (and the STDOUT and STDERR are collected to logger) I want adminScript which is running as adminBod to ...
artfulrobot's user avatar
  • 2,939
1 vote
1 answer
194 views

Check which entry is empty with yad or zenity

I'm trying to create an array of four elements using a form consisting of 4 entries: new_prop=($(zenity --forms --title="my-script" --text="Insert the values" --separator=" &...
user9952796's user avatar
1 vote
1 answer
229 views

Calculate checksum for whole content of a device and add a progress bar

I want to make a shell script, that lets the user select a mounted device and calculate a checksum for the whole data on this device. I need the checksum to test if the device has been manipulated by ...
stewie's user avatar
  • 45
3 votes
2 answers
649 views

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 ...
stewie's user avatar
  • 45
1 vote
1 answer
693 views

Zenity Progress Bar

I made a shell script which uses this command to calculate a sha256 checksum recursive for a directory for example /run/media/$USER/directory: find . -type f -exec sha256sum {} \; | sort -k 2 | ...
stewie's user avatar
  • 31
1 vote
0 answers
436 views

Zenity checklist from file

I created a checklist and I want to insert data from a file in a specific order. The data comes from a terminal command in my bash script: data=$(lsblk -o name,size,model --nodeps >> /data.txt ...
stewie's user avatar
  • 31
0 votes
2 answers
250 views

Zenity select disk/volume

is it possible to select a disk/volume with zenity instead of a single file? I know there is the zenity --file-selection command, but can you also select for example /dev/sda1 ? Thanks for your time!
stewie's user avatar
  • 31
2 votes
1 answer
236 views

zenity failing in crontab but working in shell

I'm trying to run a script that calls zenity from a crontab and it fails. The script works well from the command line. I do pass the DISPLAY in the crontab: * * * * * DISPLAY=:1 bin/myscript.sh > /...
Colin Pitrat's user avatar
-2 votes
1 answer
104 views

no slashes needed in date string provided via zenity

By using the zenity utility, select the date from the calendar; the output is 19/09/2022. I want to remove slashes between the parts of the date to make it 19092022 and store it in a variable.
Hashim David's user avatar
1 vote
2 answers
541 views

Zenity (or alternative) with custom file selector

When I use zenity and type --file-selection, if spawns the default GTK file selector. The problem with that is, of course, the lack of image thumbnails. Considering that I want to make an image ...
I.P's user avatar
  • 111
0 votes
1 answer
144 views

Show stdout and stderr in Zenith

I am trying to install .deb file by right clicking on it in Nemo. My Nemo Action Looks like: [Nemo Action] Name=Install Deb File Comment=Install %F Exec=<scripts/install_deb_file.sh %F> Icon-...
Ahmad Ismail's user avatar
  • 2,688
0 votes
1 answer
621 views

Zenity File Selection - Change Display Options?

Zenity version 3.22 (Debian Stretch). ls -a foobar . .. directory foo .foo zenity --file-selection --filename=/tmp/foobar/ yields (after a right click): I know that I can just click on the Show ...
Digger's user avatar
  • 403
1 vote
0 answers
864 views

Unix PAM module fails on login/lock screen - Permission denied - exit code 13

How it works? I'm back with yet another issue I can't figure out by myself. Basically what I have is 2 factor authentication (2FA) module based on Python PAM and with NFC card reader. Once user is ...
richardev's user avatar
0 votes
1 answer
661 views

Make root script show zenity dialog to user

I followed the instructions here to set up an automated backup, such that whenever I connect a certain external drive to the computer, the backup is automatically started. This works, but in addition ...
bassjoe's user avatar
1 vote
0 answers
596 views

Progress Bar with PV & Zenity using md5sum

I'm trying to write a script for get md5sum of unique files or multiples files inside a directory in the cli using pv to see the progress bar, and in gtk because I use Xfce 4.12 (Slackware64 14.2) in ...
Inukaze's user avatar
  • 47
0 votes
2 answers
54 views

Randomizer script failing to randomize

I am having a problem where this project is not randomizing anything. My new code: #!/bin/bash function ReRoll(){ sort -R languagecodes.txt > /dev/null sleep 0.5 LANG=$(head -n 1 /home/...
CheeseCatChuck's user avatar
0 votes
1 answer
823 views

Zenity buttons not working

So i can't figured out why my cancel button is not working on the confirmation delete zenity box... Can you please explain me ? directory=$(zenity --entry \ --text "Enter a path" \ --...
Justin Mayer's user avatar
2 votes
0 answers
534 views

Zenity Windows Too Wide; --width option not working

Using zenity version 3.14.0 and am trying to get insight into how to deal with the problem of the zenity windows being too wide. The problem shows itself when, say, a zenity info box is displaying a ...
Digger's user avatar
  • 403
0 votes
1 answer
3k views

How does zenity use options for radiolist?

I am reading linux command line and shell scripting bible, and they use zenity for radiolist in this form: zenity --list --radiolist --title "Sys Admin Menu" --column "Select" --...
milanHrabos's user avatar
0 votes
1 answer
61 views

Prevent < > ^ chars leaking out of variable

I think my script halts because the text it's about to display contains "commands" A code that displays the first 20 lines of a subtitles file: junknownsub=$(head -20 "$f") zenity -...
JoBe's user avatar
  • 397
2 votes
2 answers
786 views

Do Zenity system tray notifications not work with Cron?

I'm making a small script in which I make several calls to Zenity. Executing the script manually or executing the commands from the terminal works properly. However, when I run them from Cron they ...
FenrirWolfwood's user avatar
2 votes
1 answer
2k views

extract 5 first lines of a text file to a variable

I'm wondering if it's possible to "extract" the first 5 lines of a textfile to a single variable (not an array) for example: head -5 test.txt >$variable (which of course doesn't work) I'm ...
JoBe's user avatar
  • 397
3 votes
2 answers
723 views

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 ...
ChameleonScales's user avatar
1 vote
1 answer
71 views

how to express a range of numbers (11%-20%) in a battery notification script

I'd like to have a script that notifies me when my battery is at or above 90%, at or below 20%, and at or below 10%. I cobbled together the following, substituting zenity for notify-send so that I ...
hedge hoggy's user avatar
0 votes
0 answers
485 views

FFmpeg doesn't take input while overwrite question

My script basicly do convert videos (ex: mp4 --> mkv). Let's say there is a video file in working directory with name "1.mp4" and we want to create a new file "2.mkv". In this case script runs withour ...
user avatar
1 vote
1 answer
392 views

Showing multiple calenders in zenity command

Zenity command provides an option to show calendar to get date input, like zenity --calendar In some case, we need to get more than one dates as input. i.e., start and end date. But the zenity ...
purushothaman poovai's user avatar
0 votes
1 answer
341 views

Looking for a graphical dialog program that I can use for my bash script

I am trying to write a DD frontend in bash, and I was looking for a simple to use dialog program. I have used things like zenity before, but it was not complex enough for my needs. All I need is some ...
Defunct Lizard's user avatar
2 votes
1 answer
1k views

What are the differences/(dis)advantages of zenity vs notify-send?

There is both zenity and notify-send. (on Fedora/GNOME at least, both seems to be pre-installed.) So considering I want to show notifications, what are the differences between these too ones? Is ...
rugk's user avatar
  • 3,136
5 votes
3 answers
6k views

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 ...
AlphaCoder's user avatar
0 votes
1 answer
305 views

Lack of a text input field in zenity file selector

I have Debian 9 with xfce and installed zenity to use it to select directory paths. I use it in this way zenity --file-selection --directory The GUI selector looks as below. It has not the text ...
trzczy's user avatar
  • 650
0 votes
1 answer
618 views

Create dialog based on console output

I would like to display a dialog box using zenity or dialog or something similar based on a specific string displayed in console window? Background: I have created a wrapper shell script which calls ...
Anas Patel 's user avatar
0 votes
2 answers
1k views

running clock in zenity menu

I have created a menu by ... zenity --title="ABC" --text="Date-'date +%d%m%Y-%T'" --list --radiolist --column="select" --column="option" FALSE "1" FALSE "2" FALSE "3" Menu showing date with time when ...
kalpesh's user avatar
  • 11
0 votes
1 answer
747 views

Zenity form for easy network configuration

Im doing a zenity form for easy network configuration. The end user just fills in the information and the script does the rest. Is there a better way to do this? Any input from you guys is welcome. ...
hibridpc's user avatar
0 votes
2 answers
611 views

Cannot exit bash script correctly

I have a made a script on bash. #!/bin/bash zen(){ mark=$(zenity --scale \ --text 'FREQUENCY' \ --value=$la \ --min-value=0\ --max-value=5000 \ --step=1) } la=500 echo "Script ...
John's user avatar
  • 297
1 vote
1 answer
736 views

Zenity Shell Menu for 50+ servers, How to stay in server menu?

i am trying to make a zenity shell menu to manage 50+ servers and want to add multiple customized functions. e.g:- when server goes down i want to ssh in it, then check load,free -m, last 10 mins ...
Navdeep.D2's user avatar
1 vote
2 answers
704 views

Is there any program to get the GPG password from the GUI

I am working about a GUI PGP application with Zenity. GPG asks passphrase on terminal screen. But I want to enter passphrase from a GUI dialog box not in terminal (like zenity --password) I tried ...
astronaut_cat's user avatar
0 votes
1 answer
422 views

How to run a command once the first time the OS is used?

I am customizing OS and want to display a dialogue describing the ad hoc OS the first time the user is entering the OS. The command is saved in a script. What is the best strategy to execute a script ...
user123456's user avatar
  • 5,058
3 votes
1 answer
2k views

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. #!...
L. D. James's user avatar
  • 1,624
3 votes
1 answer
2k views

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 ...
Giulio's user avatar
  • 33
2 votes
1 answer
776 views

Is there a program that will launch a configurable context menu

I'm looking for something like Zenity or Yad, except I want something that behaves like a menu, namely: it opens right next to the cursor; it takes one click to select things; it's possible to have ...
Alex R's user avatar
  • 123
1 vote
1 answer
3k views

dialog based decisions in bash scripts?

i am trying to write a little bash script that dose different things based on some gui questions. this is how far i got right now: [Timomey@timomeyswetab ~]$ TEST=`zenity --question`; echo test=$...
treaki's user avatar
  • 121
2 votes
1 answer
3k views

yad, how to create a simple question dialog?

I know yad can do much more than zenity, but it also misses quickies like --question. What is the simplest way to mimic that zenity option on yad? Obs.: mimic quickies for other possibly missing ...
Aquarius Power's user avatar
1 vote
2 answers
6k views

How does a Zenity progress dialog's cancel button function?

While trying to make the Cancel button on a Zenity --progress window work for my scripts I've realized I don't understand how the Cancel button works at all in the example given on the Zenity Manual ...
InverseTelecine's user avatar
1 vote
1 answer
802 views

writing output of xbacklight -get to a variable in a bash script

I have a little script that lets me set the display brightness #!/bin/sh VALUE=$(zenity --scale --text="Select Display brightness" --value=50 --title "Helligkeit anpassen"); xbacklight -set $VALUE; ...
Nivatius's user avatar
  • 111
1 vote
2 answers
323 views

Listing negative numbers in zenity --list

$ zenity --list --column 'Numbers' '-3' This option is not available. Please see --help for all possible usages. $ zenity --list --column 'Numbers' -- '-3' So obviously zenity is interpreting the '-'...
user80551's user avatar
  • 1,629
1 vote
2 answers
1k views

awk output has extra carriage returns and is buffered

My ultimate goal is to get a zenity progress dialog to work while encoding with fdkaac. I first started with some code that is working when I encode "aa.wav" to "aa.mp3" with lame. This results in a ...
daniel's user avatar
  • 169
1 vote
1 answer
2k views

Creating a Wireless Network Management GUI workaround

I just installed Alpine linux, and it all went as smoothly as i'd hoped, except for the wireless networking (and XFCE's Power button and reboot buttons being greyed out, but that's irrelevant here). ...
Cestarian's user avatar
  • 2,071