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 ?
The command
starts the
display
command, waits for it to exit, and then runssleep 5 && wmctrl -r ImageMagick -e 0,254,600,800,560
if the exit status indicates success.You probably want
which starts
display
in the shell background then immediately continues with the remaining commands.It appears to be authority issue over ssh:
Luckily you can solve this by setting up some cookies:
This is a small summary of the answer. Please visit the link above for all details.