I am having problems getting screenshots.  It appears to be related to 
the gimp communicating with xwd.

Here are the details:

RedHat 7
Gimp 1.1.26 (occurred with with stock gimp as well)

To recreate the problem:
-----------+
Start gimp |
via xterm  +---> file -> acquire -> screen shot   -> grab
cmd line   |
-----------+

Results in popup menu error:  "can't open file for reading"

The xterm prompt has some more info here:
xwd: error: Can't open output file as specified.

Source code to the xwd.c plug-in has at line 381:
(http://cvs.gnome.org/lxr/source/gimp/plug-ins/common/xwd.c)
369 load_image (gchar *filename)
370 {
371   FILE *ifp;
372   int depth, bpp;
373   gchar *temp;
374   gint32 image_ID;
375   L_XWDFILEHEADER xwdhdr;
376   L_XWDCOLOR *xwdcolmap = NULL;
377 
378   ifp = fopen (filename, "rb");
379   if (!ifp)
380     {
381       g_message (_("can't open file for reading"));
382       return (-1);
383     }
....

So we're not able to read something put our by xwd, well:
it looks like there's an argument to xwd directs it to a 
non writeable file (see line 151 below).
(http://ftp.x.org/pub/R6.4/xc/programs/xwd/xwd.c)
apeda]$ cat -n xwd.c | grep -B15 -A5 "as specified"
   136  
   137      for (i = 1; i < argc; i++) {
   138          if (!strcmp(argv[i], "-nobdrs")) {
   139              nobdrs = True;
   140              continue;
   141          }
   142          if (!strcmp(argv[i], "-debug")) {
   143              debug = True;
   144              continue;
   145          }
   146          if (!strcmp(argv[i], "-help"))
   147            usage();
   148          if (!strcmp(argv[i], "-out")) {
   149              if (++i >= argc) usage();
   150              if (!(out_file = fopen(argv[i], "wb")))
   151                Error("Can't open output file as specified.");
   152              standard_out = False;
   153              continue;
   154          }
   155          if (!strcmp(argv[i], "-xy")) {
   156              format = XYPixmap;

So where to look from here?  Apparently xwd -s being given a bad 
-out argument (I think).  ???

Allan

Reply via email to