X Issue: 'color is not known to server' ?

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
Bogomips
Full of knowledge
Full of knowledge
Posts: 2560
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

X Issue: 'color is not known to server' ?

Post#1 by Bogomips » 31 Oct 2014, 21:46

USM's imagemagick v.6.8.6-10 display did not display, owing to this CentOS documented bug
Cento 7 wrote:Color Is Not Known To Server (FOREGROUND) [No Such File Or Directory].

I have installed both ImageMagick and GraphicsMagick on this computer.

Using the “display” command (from ImageMagick) to show any image gets me this message:

display: color is not known to server `FOREGROUND’: No such file or directory @ error/xwindow.c/XGetPixelPacket/3064.

No image shows up.
Consequently, updated to latest version from ImageMagick v.6.8.9-8, where display works after a fashion, and where the gui works most of the time. Although display works, have to contend with two alerts that pop up
  • display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3040.
  • display: color is not known to server `BACKGROUND': Success @ error/xwindow.c/XGetPixelPacket/3052.
before image appears.

Image appears straight away when display invoked from CLI

Code: Select all

guest@porteus:~$ display zelda.png 
display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3040.
display: color is not known to server `BACKGROUND': Success @ error/xwindow.c/XGetPixelPacket/3052.
former alerts appearing as error messages.

Similar behaviour observed here
Cento 7 wrote:Using the “gm display” command (from GraphicsMagick) to show any image gets me this message:

gm display: Unable to load font (-*-helvetica-medium-r-normal–12-*-*-*-*-*-iso8859-1) [Resource temporarily unavailable]. gm display: Color is not known to server (FOREGROUND) [No such file or directory]. gm display: Color is not known to server (BACKGROUND) [No such file or directory].

In this case, the image does appear.
but with different error message.

Dealing with alerts particularly annoying with animated gif. The alert pair appears before each frame in gui version, and before second and subsequent frames in CLI version.

Hint, in another reported instance:
Imagemagick error
From: Paul Cartwright <pbcartwright@...>
Date: Mon, 25 Nov 2013 13:54:28 -0500

I just tried to open Imagemagick in trinity and nothing happened. So I
edited the menu, found the executable and ran it in a terminal. This is
what it came back with:

:~$ display.im6
display.im6: color is not known to server `FOREGROUND': No such file or
directory @ error/xwindow.c/XGetPixelPacket/3064.


I switched to Mate desktop and Imagemagick ran as normal.. So it is a
trinity issue..
Taking the cue here, tried out on mate DE, but no improvement. Seems to point to interface between DE and X. And lastly
Cento 7 wrote:What does “Color is not known to server” actually mean?
Despite being asked on several forums, no answer as yet furnished.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5503
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: X Issue: 'color is not known to server' ?

Post#2 by brokenman » 31 Oct 2014, 22:30

Using Porteus-v3.1rc1 xfce I just downloaded imagemagick (via USM) and found it had no problems.

Dependencies were:
fftw-3.3.3-i486-1.txz ilmbase-1.0.3-i486-1.txz imagemagick-6.8.6_10-i486-1.txz jasper-1.900.1-i486-3.txz lcms2-2.4-i486-1.txz openexr-1.7.1-i486-1.txz

Display opened without error tested on various image types.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2560
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: X Issue: 'color is not known to server' ?

Post#3 by Bogomips » 01 Nov 2014, 00:17

Original bundle had no lcms2 dependency, but a couple of other dependencies. Anyway threw in lcms2 for good measure.

Running under kde v3.1rc1

Code: Select all

root@porteus:/home/guest# sh p10/Por/xzmod.sh -q p10/Por/ImMagick/ImM_180914.txt . /mnt/sda4/mods
Default Module Name: ImM_180914.xzm

Installing to Fakeroot Directory

libmpc-0.8.2-i486-2: Multiple Precision Complex Library                  [280K]
gcc-4.8.2-i486-1: Base GCC package with C support                        [46M] 
fftw-3.3.3-i486-1: Fastest Fourier Transform in the West                 [14M] 
jasper-1.900.1-i486-3: free implementation of the JPEG-2000 standard     [510K]
openexr-1.7.1-i486-1: HDR Image File Format & Library                    [4.1M]
ilmbase-1.0.3-i486-1: Industrial Light & Magic base libraries            [1000K]
imagemagick-6.8.6_10-i486-1: a robust collection of image processing too [17M] 
lcms2-2.4-i486-1: little cms engine, version 2                           [3.1M]

Creating Module ImM_180914.xzm

Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /mnt/sda4/mods/ImM_180914.xzm, block size 262144.
[=========================================================================/] 2272/2272 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 30264.23 Kbytes (29.55 Mbytes)
Displaying as gui, which does not appear, followed by CLI invocation.

Code: Select all

guest@porteus:~$ display
display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3064.

guest@porteus:~$ display /mnt/sda1/ImMagick/Usage/img_photos/zelda_orig.png 
display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3064.
both of which do not show.

Looks very much like a DE interaction.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5503
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: X Issue: 'color is not known to server' ?

Post#4 by brokenman » 01 Nov 2014, 01:41

Indeed. It worked for me under xfce and lxqt (didn't try mate) but failed under KDE.

Here is the offending code in the source xwindow.c:

Code: Select all

 3056  /*
3057  Set border color.
3058  */
3059  (void) XParseColor(display,colormap,(char *) BorderColor,
3060  &pixel->border_color);
3061  status=XParseColor(display,colormap,resource_info->border_color,
3062  &pixel->border_color);
3063  if (status == False)
3064  ThrowXWindowException(XServerError,"ColorIsNotKnownToServer",
3065  resource_info->border_color);
3066  pixel->border_color.pixel=XStandardPixel(map_info,&pixel->border_color);
3067  pixel->border_color.flags=(char) (DoRed | DoGreen | DoBlue);
It appears to be directly related to drawing the window border. The border color is set on line 3059 then the window exception is thrown on 3064.

I tried changing theme (sometimes the oxzgen theme is responsible for snags) but to no avail. Ran out of time.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2560
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: X Issue: 'color is not known to server' ?

Post#5 by Bogomips » 02 Nov 2014, 19:18

Looks like latest versions of ImageMagick more robust, catching exceptions at #3040 & #3052 , and emitting them as alerts.

Code: Select all

display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3040.
display: color is not known to server `BACKGROUND': Success @ error/xwindow.c/XGetPixelPacket/3052.
Hopefully fix, when found, will sort out causes of both these other exceptions.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply