Package: x11-apps
Version: 7.7+11+b1
Severity: normal

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Scott Jacobs <scott092...@aol.com>
To: Debian Bug Tracking System <sub...@bugs.debian.org>
Subject: x11-apps:  /usr/bin/xcursorgen  fails if config_file <filename>s 
contain full path and -p <prefix> is used as well
Bcc: Scott Jacobs <scott092...@aol.com>
Message-ID: 
<174758328202.213768.1914409976879514680.reportbug@ASUS-Prime-B350MA>
X-Mailer: reportbug 13.1.0
Date: Sun, 18 May 2025 11:48:02 -0400

X-Debbugs-Cc: scott092...@aol.com

Dear Maintainer,

I used xcur2png in a script on my cursor theme, so that I could remove all but
one size.
I then used xcursorgen to reconstitute the full theme (then copying in the
previous links).
I received "PNG error while reading" for each .png
After successfully reading the individual .png files with GIMP, eom, and
identify,
I eventually decided the .png files were fine, and that something else was
wrong.
In the source, I found that in load_image, if <prefix> exists, it (plus a '/')
is added
to the beginning of the <filename>s in the config_file, thus resulting in a
<path>/<file>
that did not exist, and could not be opened.

"New" cursors are often old cursors that are edited, or new glyphs added.
To edit or add, a cursor needs to be in .png format.
So a commonly used app xcur2png is used to split xcursors into png[s] and
config files.
xcur2png uses <path>/filename for each .png in the conf_file,
and xcursorgen, if used with -p option, tries to open
<prefix>/<path>/filename and fails.

>From the manpage:
      -p dir, --prefix dir
               Find cursor images in the directory specified by dir.   If not
specified, the current directory is used.

The average user may well think that the -p option is needed to tell xcursorgen
where the .pngs are.

Possible solutions:

1. fall back to using just <filename> if <prefix>/<filename> fails
2. add to manpage to caution user NOT to use -p option if config_file
<filename>s contain full path


-- System Information:
Debian Release: trixie/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.22-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages x11-apps depends on:
ii  libc6            2.41-7
ii  libpng16-16t64   1.6.47-1.1
ii  libsm6           2:1.2.6-1
ii  libx11-6         2:1.8.12-1
ii  libx11-xcb1      2:1.8.12-1
ii  libxaw7          2:1.0.16-1
ii  libxcb-damage0   1.17.0-2+b1
ii  libxcb-present0  1.17.0-2+b1
ii  libxcb-xfixes0   1.17.0-2+b1
ii  libxcb1          1.17.0-2+b1
ii  libxcursor1      1:1.2.3-1
ii  libxext6         2:1.3.4-1+b3
ii  libxft2          2.3.6-1+b4
ii  libxi6           2:1.8.2-1
ii  libxkbfile1      1:1.1.0-1+b4
ii  libxmu6          2:1.1.3-3+b4
ii  libxmuu1         2:1.1.3-3+b4
ii  libxrender1      1:0.9.12-1
ii  libxt6t64        1:1.2.1-1.2+b2
ii  man-db           2.13.0-1

Versions of packages x11-apps recommends:
ii  xbitmaps  1.1.1-2.2

Versions of packages x11-apps suggests:
ii  mesa-utils  9.0.0-2+b2

-- debconf-show failed

Reply via email to