I want create a simple graphical (Qt, Gtk, ...) dialog, concretly a simple print dialog, as a "frontend" to lpr, in bash. What I want? How many pages per page, printing interval. It's (at least) two options.
What is the best util(s) to solve this problem?
matedialog
(AKAmate-dialog
) uses GTK+. It may also be the only script GUI dialog tool available under Cygwin.There is
Other implementations are reported to exist:
If you use
gpm
, you can even use the mouse in a console environment. It requires a tty, so it will work over ssh, screen, xterm etc. but not when piping/redirecting.Both sport more or less the same interface so you can switch depending on whether an X display is available
Here is a dialog script that displays a simple YES/NO box:
Replacing
dialog
byxdialog
:You could use
gdialog
ingnome/ubuntu
. I can't findxdialog
anymore in 14.10. The answer from @sehe works with it just change dialog forgdialog
.I've searched what dialog creators are. I found yad and with this I can set my desired options:
And when I choose "2 pages per sheet" and pages "1-12" and after click
OK
the output will2|1-12|
.This is what I desired. Zenity or Xdialog can do similar?
Whiptail displays user-friendly dialog boxes from shell scripts
Whiptail is a
dialog
replacement using newt instead of ncurses. It provides a method for displaying several different types of dialogue boxes from shell scripts. This allows a script developer to interact with the user in a much friendlier manner.