Bug 62100 - ImageMagick does not start from Gnome menu panel
ImageMagick does not start from Gnome menu panel
Product: Red Hat Public Beta
Classification: Retired
Component: ImageMagick (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
: 55950 62162 63136 65860 66458 (view as bug list)
Depends On:
Blocks: 61901 67218
  Show dependency treegraph
Reported: 2002-03-27 09:59 EST by petrosyan
Modified: 2008-05-01 11:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-07 23:28:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for the ImageMagick- spec file to fix this problem (2.12 KB, patch)
2002-05-23 10:52 EDT, Mike McLean
no flags Details | Diff

  None (edit)
Description petrosyan 2002-03-27 09:59:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020314

Description of problem:
If I click on the "Gnome paw" (Main menu) then go to "Programs" menu then go to
"Graphics" menu and then click on "ImageMagick" entry nothing happens. 

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

How reproducible:

Steps to Reproduce:
1.click on Main menu
2.go to Programs Menu
3.go to Graphics Menu
4.click on ImageMagick entry

Actual Results:  nothing happens

Expected Results:  ImageMagick should start

Additional info:

if I type "display" in the gnome terminal then ImageMagick starts just fine.
Comment 1 Bernhard Rosenkraenzer 2002-03-27 10:25:40 EST
Since the desktop file doesn't use any KDE specific tags and it works from KDE, I think 
this is a gnome bug. 
Comment 2 Havoc Pennington 2002-03-27 11:31:34 EST
I investigated this a bit - according to strace, gnome is running the command
"display" fine, but then "display" exits for some reason - no error message
given. Here is the end of the strace:

22924 open("/tmp/magicfu3JAt", O_RDONLY|O_LARGEFILE) = 4
22924 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
22924 mmap2(NULL, 0, PROT_READ, MAP_PRIVATE, 4, 0) = 0
22924 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
22924 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
= 0x401d9000
22924 read(4, "", 4096)                 = 0
22924 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
22924 close(4)                          = 0
22924 munmap(0x401d9000, 4096)          = 0
22924 rmdir("/tmp/magicfu3JAt")         = -1 ENOTDIR (Not a directory)
22924 unlink("/tmp/magicfu3JAt")        = 0
22924 _exit(1)                          = ?

Any ideas?
Comment 3 Bernhard Rosenkraenzer 2002-03-27 11:53:09 EST
This is VERY odd, since it runs when started in any other way. Is there 
anything odd gnome does before starting an application, like clearing the 
environment or killing stdin/stdout/stderr completely? 
This seems to happen in something executed by display; At least with a quick 
grep, I can't find anything that would cause this strace snippet in 
ImageMagick itself.
Comment 4 Havoc Pennington 2002-03-27 12:44:28 EST
I figured it out - "display" exits if it gets EOF on stdin. 
Try "display < /dev/null". I think the panel is correct to set
up stdin this this way (it opens /dev/null on stdin).
Comment 5 Bill Nottingham 2002-03-28 16:29:20 EST
*** Bug 62162 has been marked as a duplicate of this bug. ***
Comment 6 Mike McLean 2002-04-10 17:53:54 EDT
Hmm... display will accept images streams on standard input for and display
them. According to the man page, you are supposed to specify the file as "-" for
this to happen, but experiment shows that it does this even if you don't.

One fix is to change the command to 
/usr/X11R6/bin/display SOMEFILE.png 
perhaps we could use
or perhaps we could use a custom image.

This fix works for me at least.
Comment 7 Mike McLean 2002-04-10 17:57:48 EDT
*** Bug 55950 has been marked as a duplicate of this bug. ***
Comment 8 Mike McLean 2002-04-10 17:58:05 EDT
*** Bug 63136 has been marked as a duplicate of this bug. ***
Comment 9 Havoc Pennington 2002-04-10 18:19:54 EDT
Why work around it with weird hacks, it's probably just a simple bug where it
gets confused by an immediate EOF on stdin... it's just not handling stdin
Comment 10 Mike McLean 2002-04-22 19:22:45 EDT
In utilities/display.c, when display is checking for command line arguments and
finds that no images are specified on the command line, it does the following:

        if (!isatty(STDIN_FILENO))
          option=(char *) "-";
          option=(char *) "logo:Untitled";

So for non-tty terminals, it tries to read an image from standard out.  This
behavior is contrary to what the man page says, but I expect that  there are
some scripts out there that rely on it.  You could simply change this to

        option=(char *) "logo:Untitled";

which would conform to the behavior described in the man page but may break some
(arguably ill-written) scripts, or you could change the Gnome launcher command
to "display logo:Untitled", which would not break anything.

...or you could check for an eof on stdin before automatically assuming it is an
image stream.
Comment 11 Mike McLean 2002-04-22 19:31:57 EDT
s/standard out/standard in/ 
Comment 12 petrosyan 2002-05-16 14:31:57 EDT
since this bug does not seem to be resolved,
I suggest to issue an update to ImageMagick package which would remove the gnome
menu entry of ImageMagick.

that would solve all the problems.

having a non-working default menu entry in the GNOME main menu gives a very bad
reputation  to RedHat Linux distribution.
Comment 13 Mike McLean 2002-05-23 10:52:31 EDT
Created attachment 58304 [details]
patch for the ImageMagick- spec file to fix this problem
Comment 14 Karsten Hopp 2002-07-02 09:21:41 EDT
*** Bug 66458 has been marked as a duplicate of this bug. ***
Comment 15 Karsten Hopp 2002-07-03 08:16:58 EDT
*** Bug 65860 has been marked as a duplicate of this bug. ***
Comment 16 petrosyan 2002-07-06 22:02:22 EDT
this bug is still present in Limbo
Comment 17 Mike McLean 2002-07-08 12:06:22 EDT
Yes, it is present Limbo public beta 1, but the latest ImageMagick rpm
(ImageMagick-5.4.7-3 -- not in Limbo public beta 1) does fix this problem.

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