Bug 492477 - `display -sample 1024x768+0+0 -window root img.png' exits with "1" even on success
`display -sample 1024x768+0+0 -window root img.png' exits with "1" even on su...
Product: Fedora
Classification: Fedora
Component: ImageMagick (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Pavel Alexeev
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2009-03-26 17:56 EDT by Michal Nowak
Modified: 2013-03-07 21:05 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-12 04:56:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2009-03-26 17:56:58 EDT
Description of problem:

display -sample 1024x768+0+0 -window root img.png
echo $?

Happens IMO on setting solid colors too.

Version-Release number of selected component (if applicable):


How reproducible:
Actual results:


Expected results:

Comment 1 Fedora Admin XMLRPC Client 2009-04-13 13:38:59 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Michal Nowak 2009-07-01 06:33:26 EDT
ImageMagick- still the same. That wrong exit code is quite annoying for app depending on it.
Comment 3 Hans de Goede 2009-08-10 04:47:53 EDT
I'm sorry but given my other Fedora / RH tasks I do not have the time necessary to keep ImageMagick in good shape. So I'm re-assigning this to
Pavel Alexeev who has been so kind to take over ImageMagick maintainance from me.
Comment 4 Pavel Alexeev 2009-08-10 07:07:09 EDT
$ display -sample 1024x768+0+0 -window '0x04e01f7a' img.png ; echo $?

Seams work to me. Did you provide correct windowid? Did IM change backgroupd of it?

$ rpm -q ImageMagick

Please reopen if problem persists.
Comment 5 Michal Nowak 2009-08-10 07:51:32 EDT
newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window root /etc/favicon.png 
newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $?


Perhaps it's happening with root window only?
Comment 6 Pavel Alexeev 2009-08-10 09:33:41 EDT
What is "root" window id?? May be you a mistaken and try use window name or title as id? In this case behavior is correct - window with this id not found, 1 returned as status. Window id must be hexadecimal number like in my example before.
Comment 7 Michal Nowak 2009-08-10 09:56:20 EDT
'root' is your desktop. It worked for me, set the img to root window (= set imt to desktop). Here's one of the references I found on the net wrt '-window root': http://www.imagemagick.org/pipermail/magick-users/2003-October/010929.html
Comment 8 Pavel Alexeev 2009-08-10 10:28:28 EDT
May be it is undocumented future (bug)?
Try something similar:
display -sample 1024x768+0+0 -window `wmctrl -l | head -n1 | cut -d' ' -f1` /etc/favicon.png
Comment 9 Michal Nowak 2009-08-10 10:45:22 EDT
newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window `wmctrl -l | head -n1 | cut -d' ' -f1` /etc/favicon.png
newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $?

What happens if I use 'GuGu' as a ID:

newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window GuGu /etc/favicon.png 
display: no window with specified ID exists `GuGu': Resource temporarily unavailable @ display.c/XDisplayBackgroundImage/13603.
newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $?


When I use 'root' as ID it writes out *no* error msg like happens with 'GuGu', so, I guess it some sort of known alias to root window.
Comment 10 Pavel Alexeev 2009-08-10 11:21:18 EDT
> When I use 'root' as ID it writes out *no* error msg like happens with 'GuGu',
> so, I guess it some sort of known alias to root window.  
I doubt. Can you contact upstream developers to clarify this?
Comment 11 Pavel Alexeev 2009-08-12 04:56:55 EDT
So, I think now what behavior correct, especially according manpage. I close it.
Please reopen, if you get other details.

Note You need to log in before you can comment on or make changes to this bug.