[SLUG] stdin vs feh

From: Eben King (eben1@tampabay.rr.com)
Date: Sun Apr 30 2006 - 13:35:48 EDT


No, "feh" is not an expression of disgust, it's an image viewer.

http://linuxbrit.co.uk/feh/

Does anybody know how to make it read an image from standard input in a
pipeline? OK, feh /dev/stdin < image works standalone. But I have a big
ol' nasty trn macro that extracts an X-Face from an article, uncompresses
it, and shows it. It worked with xv:

... | uncompface -X | xv -expand 2.0 &

compface(1) says:

   This version of compface has been patched to also be able to handle
   normal xbm images. uncompfaced will produce xbm output only if the -X
   switch is applied.

The equivalent of that command (or so I thought) with feh,

... | uncompface -X | feh --zoom 2 /dev/stdin &

doesn't. (That syntax works when not in a pipeline.) I also tried

... | uncompface -X | bash -c "feh --zoom 2 /dev/stdin" &

In both cases I get

feh - No loadable images specified.
Use feh --help for detailed usage information

If I replace the xv/feh/bash command with "file -", I get "/dev/stdin: ASCII
C program text". If I replace it with "od -t x1z | less", it shows that feh
isn't being fed an empty file, in case you don't trust "file"'s word.

Anybody done this, or should I write a wrapper that writes stdin to a file
and then shows that file?

-- 
I firmly believed we should not march into Baghdad ...To occupy Iraq
would instantly shatter our coalition, turning the whole Arab world
against us and make ... a latter-day Arab hero assigning young soldiers
to a fruitless hunt for a securely entrenched dictator[.] -- GHWB
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:05:31 EDT