Hi,
On debian we are trying to use a desktop file in order to run display
The problem is windows manager use /dev/null as stdin
the desktop entry is
display %f
where %f is an optionnal file if selected on interface.
If we use this we do not get dispaly run from the menu. indeed menu run display.im6 and get /dev/null
We workarround the problem using the following script:
if [ $# -ge 1 ]; then
exec /usr/bin/display.im6 "$@"
else
exec /usr/bin/display.im6 magick:logo
fi
Could you thus add a flag -nostdin that read the file give on the command line and by default display logo ?
Bastien
[fixed] Add a flag for display for no stdin
-
- Posts: 467
- Joined: 2008-12-21T11:51:10-07:00
[fixed] Add a flag for display for no stdin
Last edited by broucaries on 2012-07-23T09:54:30-07:00, edited 1 time in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Add a flag for display for no stdin
I can verify this strange behaviour.
displays an image
(with a tty on stdin) displays 'logo:'
displays 'logo:'
does nothing at all and just exits This is an error, should be as previous
produces an error 'no decode delegate'. Not input is EOF!
produces an valid error 'improper image header' (from the builtin MIFF coder)
Really display on reading a EOF (even for MIFF) should result in 'no images' and just display logo (unless some other swicth is specified).
Display could use options about whether the 'command widget' or 'image magnification' features should be returned, or perhaps as a new feature, to simply return 'user point picking'... "montage" has a '-mode' option that could be used for similar effect.
Note the big feature 'display' has is -remote option, something few image display programs have... See
http://www.ict.griffith.edu.au/anthony/ ... ontrol.txt
Code: Select all
display image
Code: Select all
display
Code: Select all
display /dev/null
Code: Select all
display </dev/null
Code: Select all
display - </dev/null
Code: Select all
display miff:- </dev/null
Really display on reading a EOF (even for MIFF) should result in 'no images' and just display logo (unless some other swicth is specified).
Display could use options about whether the 'command widget' or 'image magnification' features should be returned, or perhaps as a new feature, to simply return 'user point picking'... "montage" has a '-mode' option that could be used for similar effect.
Note the big feature 'display' has is -remote option, something few image display programs have... See
http://www.ict.griffith.edu.au/anthony/ ... ontrol.txt
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Add a flag for display for no stdin
We can reproduce the problem you posted and have a patch. Look for it in ImageMagick-6.7.7-6 Beta by sometime tomorrow. Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Add a flag for display for no stdin
Code: Select all
display </dev/null
The others remain unchanged.
Note if an error occurs in an image so that no valid image results for display, logo will be displayed.
This may not be right. Logo should be displayed if no image is given.
But if an image is given, but errors, then perhaps display should just report error (like it does) and exit without displaying anything.
For example for
Code: Select all
display - </dev/null
OR
Code: Select all
display miff:- </dev/null
Also what about 'streaming' image file formats like MIFF and PBMplus?
Zero images in the stream may actually be valid, and not an error?
Would "broucaries" like to comment!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/