Opening cursor files in a graphics editor?

Solution 1:

The cursor files uses X11 cursor type of files:

$ file /usr/share/icons/DMZ-White/cursors/hand2
/usr/share/icons/DMZ-White/cursors/hand2: X11 cursor

GIMP plugin

You need a plugin to edit cursors files with GIMP called "X11 Mouse Cursor (XMC) plug-in" which you can find here.

The X tool

You can also create your own PNG images and transform them to cursors files using "Xcursorgen" which can be found in the x11-apps package.

Third party

Gursor Maker is a front end for xcursorgen.

References:

  • http://gimpchat.com/viewtopic.php?f=23&t=2201
  • http://mailman.cs.huji.ac.il/pipermail/linux-il/2009-April/001196.html
  • http://www.ehow.co.uk/how_7486801_make-own-x11-cursors.html

Solution 2:

Xcursor Viewer can be used for preview cursor. It hasn't any editing features. Only viewing.enter image description here

Solution 3:

copied from OP edit:


Found also Gursor Maker - Cursor Editor for X11/GTK+; got the CVS code from SourceForge - it still uses Numeric (the old name of numpy), so to run it, you'll have to do:

#from Numeric import *
from numpy import *

... in xcurio.py, curxp.py, gimp.py, colorfunc.py - and comment the #from xml.dom.ext.reader import Sax2 in lsproj.py. With that, I got it running 11.04:

gursormaker

... but cannot get any files to open? So I thought I should grep for paths, nothing much came up - and when I looked into cursordefs.py, I simply had to paste this:

CURSOR_ICON = gtk.gdk.pixbuf_new_from_xpm_data([
        "10 16 3 1",
        "       c None",
        ".      c #000000",
        "+      c #FFFFFF",
        "..        ",
        ".+.       ",
        ".++.      ",
        ".+++.     ",
        ".++++.    ",
        ".+++++.   ",
        ".++++++.  ",
        ".+++++++. ",
        ".++++++++.",
        ".+++++....",
        ".++.++.   ",
        ".+. .++.  ",
        "..  .++.  ",
        "     .++. ",
        "     .++. ",
        "      ..  "])

Heh :) In any case, doesn't look like it will be much usable on newer Ubuntus, unfortunately...


Just tested XMC plugin as well - on 11.04, has to be built from source (from the link in the accepted answer); the requirements on my system resolved to:

sudo apt-get install libgimp2.0-dev libglib2.0-0-dbg libglib2.0-0-refdbg libglib2.0-cil-dev libgtk2.0-0-dbg libgtk2.0-cil-dev

... after that, the configure/make procedure in the INSTALL file works. Note that this plugin is a bit "sneaky":

xmc

... that is, you should use "All files" (as there are no extensions); cursor previews at first will not be rendered. Then open one cursor file; after it has been opened, then there is a preview in the File/Open dialog; but other than that, it works fine...

Solution 4:

There is also xcur2png, which allows converting the image data of cursors to PNG and creates .conf files.

Only an inofficial 64bit .deb build is available but luckily the source is non-problematic to compile, just make sure libxcursor is installed.

This answer was found at https://unix.stackexchange.com/questions/241364/

Solution 5:

Pretty old thread, if somebody searching for this:

Gimp is now supports it natively. So just open and can export to xcm.