Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
1answer
109 views

Zenity: get selected filename without its path

I need zenity to put a selected filename into a variable without its path. What I have now is file_to_copy="$(zenity --file-selection --title='Select a File')" echo $file_to_copy then prints /home/...
1
vote
1answer
61 views

How to detect if the user has clicked on “Quit” in a zenity list

This is my code: while true; do choice=$(zenity --list --text "Users are listed below." --title "Result" --ok-label="Back to Menu" --cancel-label="Quit" --column=Users $(cut -d : -f 1 /etc/passwd)...
-1
votes
1answer
320 views

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 --...
1
vote
1answer
305 views

Bash one-liner to display ALL `gsettings` in Zenity or Yad

Recently I've been encountering many questions in Ask Ubuntu that require changing gsettings to solve the problem. For example this question: How to prevent shutdown when one of two batteries is empty?...
3
votes
1answer
753 views

Zenity multi-choice from keyboard

I was looking for a zenity script that would offer choice between multiple commands (logout options, programs). Looking at the script discussed here (that uses the --radiolist option) I have noticed ...
3
votes
1answer
112 views

Using wmctrl with zenity prompt causes budgie-wm segmentation fault [closed]

I'm attempting to write a bash script that switches between workspaces with some dialog prompts along the way. I'm running Ubuntu 17.04 with Budgie remix. When using wmctrl or zenity separately, they ...
2
votes
2answers
3k views

How to make a progress bar work in Zenity?

I am writing a simple basic bash script (starting with #! /bin/bash, file format is .sh) and I am trying to make a progress bar work: #!/bin/bash echo "You are running in LXDE mode. Answer 'yes' or ...
0
votes
1answer
793 views

Zenity remote display text issue

When i run command: ssh user@host "zenity --warning --width=500 --no-wrap --text="Your $VPN is not connected. Please connect it or inform to engineer" --display=:0" If I use single quote then it ...
4
votes
1answer
2k views

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?" _ ...
4
votes
3answers
3k views

How to make zenity “transient parent” warning disappear permanently

Zenity annoys me by always displaying the warning in terminal: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. Apparently I'm not the only one: linuxquestions.org - ...
4
votes
1answer
1k views

Bash template to use zenity (or yad) to insert / edit / delete records in a file or database

I’m looking for a bash template that uses zenity or yad to maintain a list of records. The template could be a shopping check list with print option or it could be a list of servers to monitor ping ...
4
votes
2answers
1k views

How to edit YAD question labels (example)?

YAD is a Zenity fork. I have this yad script: #!/bin/bash yad --text="Execute the file? (press 'Cancel' to open in text editor)" case $? in 0)thunar "$1" ;; 1)gedit $1 ;; esac ...
1
vote
2answers
1k views

Zenity script: dismiss window with close (x) button or Esc

Following this solution I have a zenity script to ask me what to do when clicking an executable script in Thunar or a desktop file in Pantheon Files: #!/bin/bash zenity --question --text="What to do?...
4
votes
2answers
371 views

Using Zenity to maintain configuration file

I need to setup a configuration file in Bash and believe Zenity is the best method but am having problems finding a link using google with a suitable example. So far my code looks like this: #!/bin/...
1
vote
1answer
100 views

Enter GPG passphrase with Zenity GUI enviroment

I am working about a Zenity GUI based GPG application. But I have a problem with that. GPG ask passphrase for encryption in terminal with this command gpg -c $FILE. However users must enter their ...
1
vote
2answers
3k views

pipe stdout to zenity notification

I would like to pipe the stdout of shutdown -P +60 to zenity --notification. But this does not work: sudo shutdown -P +60 | zenity --notification
0
votes
1answer
520 views

Get path to folder using zenity [duplicate]

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

How do i Create a Zenity form with a check list in it

I am trying to create a small GUI in Zenity, for it i a few text inputs coupled with a checklist. It seems however the only list i can add to a form is a list of fixed values, and not one with ...
0
votes
0answers
26 views

Detect cancelling zenity when script is run as sudo [duplicate]

I use Ubuntu 14.04 and have a simple script: OUTPUT=$(zenity --forms\ --title="new"\ --text="Add new"\ --separator="," \ --add-entry="path"\ ) accepted=$? if ((accepted != 0)); then echo "...
2
votes
0answers
55 views

How to resume zenity list after picking choice?

I have a zenity list whose entries call different scripts. Among them there is a scripts which concatenates all the results from other scripts. I would like to recall this script so I can save what I ...
15
votes
3answers
27k views

error message when running zenity under 16.04: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged

Under ubuntu 16.04 I get the following message Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged when I open zenity with the command zenity --text-info --filename=&...
0
votes
1answer
469 views

Zenity list dialog from variables

I have a bash script which looks like this: column_names="--column=\"TargetDir\" --column=\"TargetPage_ID\" --column=\"TargetTitle\"" row="\"Target Dir 1\" 1 \"TargetTitle 1\"" echo "column_name is: ...
2
votes
0answers
239 views

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 ...
2
votes
1answer
568 views

zenity list in forms dialog is not viewable

What I am trying to do is this: zenity --forms --add-list my_list --list-values="one|two|three" What I get is this: That white line in the center is the list , which for some reason has no width ...
0
votes
0answers
59 views

gdialog does not allow entering or double clicking

The thing is, I have had pretty hard times with gdialog recently. Let's demonstrate the problem first with this bash code sample: #!/bin/bash source ./Functionlib temp1=$(mktemp -t tfile.XXXXXX) ...
0
votes
2answers
199 views

ctmconv, zenity and filenames with spaces

I'm making a little conversion script in Zenity, but have noticed that ctmconv won't allow spaces in a filename. Can I get rid of spaces in the input filename? #!/bin/bash cd ~/Desktop file="$(zenity ...
0
votes
1answer
166 views

Change filetype using zenity

Having zero experience with scripting of any sort, I apologise if this question is too simple to be allowed here. I have discovered zenity, which I think is very useful as my memory is hopeless, so ...
1
vote
1answer
81 views

Get exit status from Pipe contained in brackets

How do I get the exit status of a command in a pipe contained in brackets: (bzcat File_Here | pv -n --size "Size_in_Bytes" | dd of=/dev/sdX) 2>&1 | zenity --title="SD Utility - Write" --...
1
vote
0answers
323 views

Using zenity progress bar with bzcat to dd copy

I know there are ways to add a progress bar to dd, but I can't seem to get anything to work with my specific situation. Here is what I have so far: bzcat /file/path/goes/here.dd.bz2 | pv -n | dd of=/...
0
votes
1answer
49 views

13 times 'zenity' with status Zombie

I have 13 times zenity with status Zombie in my system-monitor. Could there be any virus or what else could it be? I have read this: What are zombie processes? but I can't do anything with it ...
0
votes
1answer
143 views

Zenity and bash

I have a broblem with bash script. I want to go back to menu but have an error from terminal "unexpected end of file" #!/bin/bash users=$(awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) ...
1
vote
0answers
160 views

Trying to pipe steamcmd output to yad

In order to run a server through steam I need to run this command from it's install directory, this works, and has worked for quite some time. ./srcds_run -game garrysmod +maxplayers $play +...
0
votes
1answer
545 views

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
1
vote
0answers
30 views

How could you password protect an application [duplicate]

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
4
votes
2answers
500 views

Can a Zenity list display a string `--option`?

Is it possible to have a Zenity list-style menu show a code option like -r? I am trying to make a simple GUI for an FFMPEG bash script. This is just one prompt for selecting a framerate for a video. ...
4
votes
2answers
442 views

Simple Zenity script - to select icon?

I am trying to make a simple graphical Zenity+Bash script that will list all the icon themes available in /usr/share/icons, then let the user select one and click "OK" to replace gtk-icon-theme-name="...
0
votes
2answers
63 views

How to make a multistep command ask for inputs?

Sorry for the confusing title but here's what I want to do. I run this command quite often: w3m -dump http://www.example.com/file-to-save-as-text/ > ~/Desktop/saved-file.txt Is it possible to ...
1
vote
1answer
59 views

how to fix filenames with dash or space

I created a bash file, but when I run it to those files (or folders) which they have "space" or "-", my command doesn’t work! how to fix this problem. #!/bin/bash dpi=$(zenity --entry --text "...
0
votes
3answers
3k views

Building a dynamic zenity list using bash variable

I am attempting to build a zenity interface calling one of a bunch of scripts located in a specific folder. For this, I am relying on zenity --list. I want the list to have two columns: 1) script ...
1
vote
1answer
2k views

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 ...
0
votes
1answer
713 views

What does this zenity mean when it says “Couldn't connect to accessibility bus”?

Context: Ubuntu 14.04 (trusty), 3.19.0-26-generic (#28~14.04.1-Ubuntu SMP Wed Aug 12 14:09:17 UTC 2015), Xorg 1.17.1 (13 May 2015 04:35:05AM), Toshiba Satellite L750 I am trying to write a script to ...
3
votes
3answers
939 views

Get variable from Zenity list generated from .csv file

I'm trying to get the value from zenity list. But it doesn't work. Some help would be nice :) If I remove the ans=$ I get the value from zenity in terminal like this: 10.33.54.13|10.33.54.13 But ...
1
vote
1answer
404 views

How to handle file names with spaces in zenity commands

I am developing a GUI search program. I need help to handle filenames with spaces. I just can't figure it out. Here is my code: #!/bin/bash USERNAME=$(whoami) INPUT=$(zenity --entry) updatedb --...
1
vote
1answer
3k views

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 ?
3
votes
1answer
3k views

youtube-dl file download progress with zenity progress bar

How to add youtube-dl file download progress percentage to zenity progress bar sample code (just an example, not a working one) #!/bin/sh ( progress=$(youtube-dl --extract-audio --audio-quality 0 ...
1
vote
1answer
2k views

Hiding terminal when executing zenity bash script by double click

Is there a way to hide terminal when a bash script for zenity is executed eg: szAnswer=$(zenity --entry --text "where are you?" --entry-text "at home"); echo $szAnswer I want to hide the terminal ...
0
votes
1answer
239 views

Fetching details using awk in zenity list

I am using youtube-dl to fetch videos and its format. this is my code youtube-dl -F https://www.youtube.com/watch?v=uvr1xiEaICU |awk 'NR > 5 { print}' | zenity --list --column "youtube" And ...
1
vote
0answers
174 views

Zenity (alike) File Browser with custom filesystem Root

I am creating ubuntu application which need to display file browser from command line, and request file selection from user. I am aware usage of zenity --file-selection --file-filter="MP3 Files | *....
7
votes
2answers
5k views

How to use zenity file selection

I am new to zenity and I am trying to make a simple script for loading a file using zenity --file-selection and the wc command to get the word count of that file. I have successfully made a form which ...
1
vote
0answers
239 views

Message says downloading wine-unity3d-installer (N/A MiB) appears, does not go away

A zenity message saying "downloading wine-unity3d-installer (N/A MiB)" will sometimes appear while I am doing something and just show a flashing download bar forever. I can force close it but a few ...