Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297220 - x11-misc/xxkb: fails to display XPM icons when built with 'svg' USE flag
Summary: x11-misc/xxkb: fails to display XPM icons when built with 'svg' USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-16 20:00 UTC by Simeon Maryasin
Modified: 2010-04-08 20:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
My emerge --info, if you need it (emerge --info,4.32 KB, text/plain)
2010-03-16 01:47 UTC, Simeon Maryasin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Maryasin 2009-12-16 20:00:10 UTC
When xxkb built with 'svg' use flag, it fails to display shipped with it xpm icons:

xxkb: SVG file `/usr/share/xxkb/en15.xpm': Error domain 1 code 4 on line 1 column 1 of file:///usr/share/xxkb/en15.xpm: Document is empty

Maybe it must convert them to SVG during install with 'svg' useflag?

Reproducible: Always
Comment 1 Simeon Maryasin 2009-12-16 20:04:56 UTC
Oops, xpm is a raster format...
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2010-03-15 19:39:07 UTC
About which xxkb version are you talking? Could you please also provide your emerge --info output?
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2010-03-15 19:46:24 UTC
(In reply to comment #2)
> About which xxkb version are you talking? Could you please also provide your
> emerge --info output?
> 
Sorry, the version question was silly - no svg use flag for the old version :-)
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2010-03-15 20:10:45 UTC
Just provided it with .svg images and I got the same result as I currently get without svg use flag:
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  62 (X_CopyArea)
  Serial number of failed request:  500
  Current serial number in output stream:  504

I get quite a few hits when googeling for xxkb "invalid parameter attributes", but most of them are Russian. Looking at your e-mail address, maybe you can help and check if there is a known solution to this problem?
Comment 5 Simeon Maryasin 2010-03-16 01:42:15 UTC
It seems that "BadMatch" error is unrelated to images.
BTW, documentation is slightly out of date: one must use "XXkb.mainwindow.image.N" instead of "XXkb.mainwindow.xpm.N" and same for XXkb.label .

XXkb works for me when I put svg images (from Wikipedia) to /usr/share/xxkb/ and with following .xxkbrc:
---
XXkb.mainwindow.type: tray
XXkb.button.geometry: 16x16-3+0
XXkb.button.image.1: en.svg
XXkb.button.image.2: ru.svg
XXkb.button.image.3: su.svg
XXkb.mainwindow.geometry: 16x16+0+0
XXkb.mainwindow.image.1: en.svg
XXkb.mainwindow.image.2: ru.svg
XXkb.mainwindow.image.3: su.svg
---

It seems that svg support is experimental/undocumented, as it isn't reflected at all in docs.
Comment 6 Simeon Maryasin 2010-03-16 01:46:08 UTC
So we need not only install xpm icons, but also fix /etc/X11/app-defaults/XXkb to point to them. And xpm icons are useless with svg-enabled version, at least ATM.
Comment 7 Simeon Maryasin 2010-03-16 01:47:39 UTC
Created attachment 223835 [details]
My emerge --info, if you need it
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2010-03-16 08:47:58 UTC
So maybe the error I get is related to using KDE4 or some setting in the xdefaults-file.

Plan for xxkb:

If svg is in USE, fix the XXkb file to point to svg files, depend on imagemagick and convert the .xpm to .svg.
Any other suggestions?
Comment 9 Simeon Maryasin 2010-03-16 16:44:50 UTC
(In reply to comment #8)
> If svg is in USE, fix the XXkb file to point to svg files, depend on
> imagemagick and convert the .xpm to .svg.
> Any other suggestions?

Converting raster image (xpm) to vector (svg) is maybe a bad idea, because imagemagick's convert utility converts every pixel to small circle. So, resulting image will be extremely heavy and displays extremely slow:

$ convert en48.xpm en.svg
$ ls -lh en*
-rw-r--r-- 1 mars mars 2.6K Mar 16 16:47 en48.xpm
-rw-r--r-- 1 mars mars 103K Mar 16 16:47 en.svg

So, is it possible to get svg images from some other source? (Maybe from Wikipedia?)
Comment 10 Patrick Kursawe (RETIRED) gentoo-dev 2010-03-18 20:20:41 UTC
(In reply to comment #9)
> Converting raster image (xpm) to vector (svg) is maybe a bad idea, because
> imagemagick's convert utility converts every pixel to small circle. So,
> resulting image will be extremely heavy and displays extremely slow:
> 
> $ convert en48.xpm en.svg
> $ ls -lh en*
> -rw-r--r-- 1 mars mars 2.6K Mar 16 16:47 en48.xpm
> -rw-r--r-- 1 mars mars 103K Mar 16 16:47 en.svg

Good point.

> So, is it possible to get svg images from some other source? (Maybe from
> Wikipedia?)

Excellent idea. I just checked a few images and they are in the public domain
(or equivalent). I hope I'll get around to do this next week. 
Comment 11 Patrick Kursawe (RETIRED) gentoo-dev 2010-04-08 20:17:54 UTC
Well, later than expected, but just put -r1 into CVS. Please give it a try and re-open if there are problems.