nameless palettes show up in inkscape palette selection tool

Bug #780659 reported by fabtagon on 2011-05-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
inkscape (Ubuntu)

Bug Description

Binary package hint: inkscape

When Inkscape loads a palette file (in GIMP .gpl format), it uses the contents of the "Name: " header in the file to create a label in the palette selector. If the "Name: " header is missing, then the palette selector label remains unset.

Inkscape should handle this situation by providing a fallback, for example the palette filename or a default string such as "Unnamed palette"

At the bottom right corner, the colour palette changer resides. I can change the palettes as expected, but some palettes show up without a name (but switching to them changes the palette shown in the bottom line). An illustrating screenshot is attached.

Deleting ~/.config/inkscape and restarting inkscape does not resolve the issue.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: inkscape 0.48.1-2ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Tue May 10 19:29:14 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
 PATH=(custom, user)
SourcePackage: inkscape
UpgradeStatus: Upgraded to natty on 2011-04-28 (12 days ago)

fabtagon (fabtagon) wrote :
Alex Valavanis (valavanisalex) wrote :

Thanks for reporting this bug. I don't experience this problem using inkscape_0.48.1-2ubuntu2 in Natty (running GNOME). Are you using KDE?

Changed in inkscape (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
su_v (suv-lp) wrote :

Can you check the contents of the shared palettes directory for any files which don't have the *.gpl ending (possibly backups autogenerated from a text editor, which might be hidden in default views of the file manager)?

Usually the shared resources are installed in '/usr/share/inkscape'.

fabtagon (fabtagon) wrote :

I'm running a mixed setup consisting of an awn dock, a nautilus as desktop background, and through kate even the KDE deamons are running.

/usr/share/inkscape/palettes has 19 .gpl + 1 README file.

In the Inkscape palette selector I do see "auto" as first entry, followed by 19 palettes with names (matching those in /usr/...), then a lot (~25) of mainly nameless entries with four named ones ("Tango Icon Theme Palette", "SVG") included (as seen on the screenshot).

I've strace'd inkscape. Grepping the result for palettes hits
(1) afore mentioned files in /usr/share/inkscape/pallettes
(2) the empty directory ~/.config/inkscape/palettes
(2) some extension related files, e.g.: open("/usr/share/inkscape/extensions/export_gimp_palette.inx", O_RDONLY) = 8
(I didn't install any extensions, (couldn't write to /usr/... as simple user anyway) so I guess these come bundled with inkscape)

fabtagon (fabtagon) wrote :

(I'm currently grepping my disk for "Tango Icon Theme Palette" - the string has to have some origin - and if it's uncompressed it'll be found.)

fabtagon (fabtagon) wrote :

What's the order of appearance of palettest? I've just added a custom palette, and it shows up first (followed by the 19 palettes from /usr/share/inkscape/pallettes). The unnamed palettes do come afterwards - might this indicate a special source?

su_v (suv-lp) wrote :

Could you check any files in the (data) paths listed in 'Preferences > Misc > System info'?

Possibly unrelated, but I had earlier noticed that Inkscape parses the file contents of _all_ files in the 'palettes' directories (shared, user), and loads them if it detects the proper file format (for example: after editing a palette file in vim, the backup file *.gpl~ is loaded and listed as well after the next launch of Inkscape).

About the sort order: as far as I know, the user palettes are listed above the shared ones.

su_v (suv-lp) wrote :

Do you happen to have the 'Agave' [1] colorscheme editor installed, or any other application to edit/create palettes? Could it be that palettes locations are shared (via XDG resource paths)?

[1] Searching for the palette name on the web led me to <>:
<quote> (…) Agave comes pre-loaded with a set of large color palettes. They include "Visibone," "Tango Icon Theme Palette," "GNOME Icon Palette," and "Web Safe Colors." </quote>
These palettes names partially match those listed in your earlier comment and on the screenshot.

su_v (suv-lp) wrote :

You might also check the existence of '/usr/share/create/swatches/*' (possibly used by software like Agave). A quick test shows that Inkscape loads palettes stored in the 'share/create/swatches' directory and lists them below its own shared palettes loaded from 'share/inkscape/palettes'.

from 'src/path_prefix.h':

fabtagon (fabtagon) wrote :

I'm just dropping by to boldly report my grep findings, only to find 'em already being expected ...

Yes, indeed these evil palette files (mainly) without names reside there. All of them belong to the package create-resources.

Maybe the bug should be handed over to create-resources? As some of the palette files do indeed have names set (and these few get shown correctly in Inkscape), adding names (easiest: take the filenames) should not harm any application using these.

(based on the file names, the palettes seem to have been looted from Gimp, OOo and Inkscape, and thus are more or less duplicates, but that's another issue)

fabtagon (fabtagon) wrote :

Additional suggestions: Maybe Inkscape could label palettes, which do not deliver a name on their own, with their file names or as "unnamed palette". This would not look like an error anymore and really resolve the issue for any palette it might come across in the future, might it be delivered by an Ubuntu package or a 3rd party commercial application.

su_v (suv-lp) wrote :

Confirming the feature request for Inkscape to insert a generic palette name or use the file name instead if there is no name defined in the palette file.

@Alex - could you take a look at other packages affected (e.g. create-resources) on ubuntu and other linux distros (user proper resources names for installed shared resources)?

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Alex Valavanis (valavanisalex) wrote :

@~suv - I'll have a look tonight if I get chance. :)

Changed in inkscape (Ubuntu):
assignee: nobody → Alex Valavanis (valavanisalex)
description: updated
Alex Valavanis (valavanisalex) wrote :

Please see bug #781350 for the unnamed palettes in the create-resources package. I'll leave this bug open in inkscape (Ubuntu), to track Inkscape's handling of unnamed palettes.

Changed in inkscape (Ubuntu):
assignee: Alex Valavanis (valavanisalex) → nobody
status: Incomplete → Triaged
Alex Valavanis (valavanisalex) wrote :

Patch submitted for create-resources package in Ubuntu (bug #781350)

Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
importance: Wishlist → Low
su_v (suv-lp) wrote :

Unassigning - no activity since 2011-05-12.

tags: added: easy-fix
Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → nobody
status: Confirmed → Triaged
Changed in inkscape:
assignee: nobody → Adrian Boguszewski (adrianboguszewski)
status: Triaged → In Progress

Fixed in patch

The attachment "fixed780659.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

Now there is filename instead of blank string.

Mc (mc...) wrote :

Commited in trunk rev 14697.

Thanks for the fix!

Changed in inkscape:
milestone: none → 0.92
status: In Progress → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers