After several trial & error, I installed another image viewer on my remote machine (feh
), setting in up— and tried the command once again.
feh WARNING: /tmp/feh_stdin_ZwCjv7 - No Imlib2 loader for that file format
feh: No loadable images specified.
See 'man feh' for detailed usage information
I think this is the problem that caused ImageMagick's display
to burst out error.
display: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
According to https://superuser.com/a/1517417/1106777, the command failed because I started display
as a background job (&
).
If the process is started with
&
then the shell will actually redirect its stdin from/dev/null
to avoid any read attempts.
If I removed the trailing &
, the command will ran without any problem, take an example of:
Working
ssh beer@laika "DISPLAY=:0 feh -" < <(cat 1.jpeg)
(Also) working
ssh beer@laika "DISPLAY=:0 display -" < <(cat 1.jpeg)
How to send stdin to background &
job ?