Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

am 12.11.2007 19:51:06 von junk

Hi all!

I'd like to write a simple bash script that displays an image with
some text in a dialog box. The "dialog" program doesn't seem to handle
this, so I was wondering if there was an add-on to dialog, or some
framebuffer image viewer (like qiv?) I could run inside dialog, or if
I should just forget trying to do this in the shell altogether.

I know there's any number of other languages I could use to do this,
but I'd really like to do this in the shell if I can, or, failing
that, use a graphical frontend to the shell. I looked at Xdialog, but
that didn't seem to have image display capabilities either. (I'm
hoping I'm wrong; it's using the Gimp toolkit after all.)

I saw one suggestion in the archives for simply generating an HTML
file and then viewing it in a browser. This is neat, and I do know
PHP, but I'm really a glutton for doing things _fast_, and I still
haven't found a graphical browser with fast keyboard shortcuts
(although Firefox with the Vimperator extension comes close).
Also I have in mind functionality that, with the browser route, would
wind up requiring PHP and a database backend and ... well, I'd rather
do it in the shell.

If anyone has any suggestions (even something like, Go learn Python,
fool), I'd be most appreciative.

Thanks!
Bill Powell

Re: Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

am 14.11.2007 05:17:21 von brian_hiles

j...@billpowellisalive.com wrote:
> I'd like to write a simple bash script that displays an image with
> some text in a dialog box. The "dialog" program doesn't seem to handle
> this, so I was wondering if there was an add-on to dialog, or some
> framebuffer image viewer (like qiv?) I could run inside dialog, or if
> I should just forget trying to do this in the shell altogether.

There are so many "dialog" programs, comprising a sundry
convolution of graphic libraries (GTK, Xlib), CLI libraries
(curses, ncurses), and interfaces (XML, API).... Have you seen

http://hightek.org/dialog/

which attempts to untangle the mess. Wdialog (not currently
accessible) _sounds_ worth investigating. Although I am an
old-time curses(3) programmer, I haven't involved myself in
TUIs (Text User Interfaces) since.

> I know there's any number of other languages I could use to do this,
> but I'd really like to do this in the shell if I can, or, failing
> that, use a graphical frontend to the shell. I looked at Xdialog, but
> that didn't seem to have image display capabilities either. (I'm
> hoping I'm wrong; it's using the Gimp toolkit after all.)

One that looks promising, incorporating that fine balance
between RAD and generality, is GTK-server:

"GTK-server": GUI Builder: under Linux/Win32; requires GTK1|GTK2
http://www.gtk-server.org/
http://www.turtle.dds.nl/gtk-server/
bash(1) examples: http://www.turtle.dds.nl/gtk-server/examples.html

> I saw one suggestion in the archives for simply generating an HTML
> file and then viewing it in a browser. This is neat, and I do know
> PHP, but I'm really a glutton for doing things _fast_, and I still
> haven't found a graphical browser with fast keyboard shortcuts
> (although Firefox with the Vimperator extension comes close).

Veni, Vidi, Vici, Vimperator! Thanks for the link! :) :)

> Also I have in mind functionality that, with the browser route, would
> wind up requiring PHP and a database backend and ... well, I'd rather
> do it in the shell.

Good for you! But, by your description, this project seems
like a non-trivial production environment. I daresay that
perhaps for you the shell is not optimal for both performance
reasons and existing codebases which are available for other
languages, like perl (*::DB), ruby (Ruby On Rails), or
python.

(Gedafe is quite interesting, if dated. See:
"Gedafe.pl": GEneric DAtabase Front-End -- automatic Web interface
over postgreSQL
http://isg.ee.ethz.ch/tools/gedafe/
)

> If anyone has any suggestions (even something like,
> Go learn Python, fool), I'd be most appreciative.

For two years now I have surveyed solutions for shell
GUIs for a project I am still defining. In a file, I
have 48 references for various GUI-over-shell solutions,
and I'm sure the list in not comprehensive. But some
obvious truths I hope are self-evident: (1) graphical
solutions that rely upon the luck of an appropriate
configuration are not the way to go anymore; (2) the
TUI is now obsoleted as the L.C.D. of computational
power and features is much better now; (3) and now, at
last, the WUI is now entirely practical. Just look at
what TIBCO can do!:

http://tibco.com/devnet/gi/default.jsp

So, it's never fast, Fast, FAST! to learn the New Thing,
but XForms is truly the Wave Of The Future. There's even
a plugin for FireFox:

"MozzIE": XForms plugin for FireFox
http://sf.net/projects/mozzie/
http://www.w3.org/MarkUp/Forms/2003/xforms-faq.html

.... but, for the nonce, the best and most innovative
approach that I've yet seen, applicable to your specs, is:

"Kaptain.cpp": universal graphical front-end for any script
http://sf.net/projects/kaptain/
http://sf.net/projects/kaptain/docs/kaptain.html
http://linuxgazette.net/issue64/evans.html
examples: http://userpage.fu-berlin.de/~sgmd/screenshots.html

> Thanks! Bill Powell

You're welcome. Good luck!

=Brian

Re: Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

am 14.11.2007 18:23:34 von Thomas Dickey

bsh wrote:
> There are so many "dialog" programs, comprising a sundry
> convolution of graphic libraries (GTK, Xlib), CLI libraries
> (curses, ncurses), and interfaces (XML, API).... Have you seen

> http://hightek.org/dialog/

It's a little old (out-of-date).

This is up to date though:

http://invisible-island.net/dialog/

> which attempts to untangle the mess. Wdialog (not currently
> accessible) _sounds_ worth investigating. Although I am an

I never saw a version that wasn't basically an alpha.

> old-time curses(3) programmer, I haven't involved myself in
> TUIs (Text User Interfaces) since.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net