Xdg-icon-resource "line 1076: unexpected EOF while looking for matching ``'"

Hi,

I ran into a bug running xdg-icon-resource, but I’m not sure where to report it.

How to reproduce the bug

In the almalinux:10 container I ran this to reproduce the issue

[root@494e02028b21 mnt]# dnf install xdg-utils
[root@494e02028b21 mnt]# mkdir -p /usr/share/icons/hicolor/16x16
[root@494e02028b21 mnt]# xdg-icon-resource install --size 16 16x16/apps/google-chrome.png 
/usr/bin/xdg-icon-resource: line 1076: unexpected EOF while looking for matching ``'

shellcheck

Running /usr/bin/xdg-icon-resource through shellcheck I get the following output

Line 981:
  path="$(xdg_realpath "$1")" 2> /dev/null` # Normalize path
                                          ^-- SC1078 (warning): Did you forget to close this backtick expansion?
 

solution

Editing this line and removing the backtick quote and then re-running the above command resolves the issue

[root@494e02028b21 mnt]# vi /usr/bin/xdg-icon-resource 
[root@494e02028b21 mnt]# xdg-icon-resource install --size 16 16x16/apps/google-chrome.png 
[root@494e02028b21 mnt]# echo $?
0
[root@494e02028b21 mnt]# ls /usr/share/icons/hicolor/16x16/apps/google-chrome.png 
/usr/share/icons/hicolor/16x16/apps/google-chrome.png
[root@494e02028b21 mnt]# stat /usr/share/icons/hicolor/16x16/apps/google-chrome.png 
  File: /usr/share/icons/hicolor/16x16/apps/google-chrome.png
  Size: 787       	Blocks: 8          IO Block: 4096   regular file
Device: 0,142	Inode: 8066825     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2025-06-10 15:43:22.865889532 +0000
Modify: 2025-06-10 15:43:22.866961239 +0000
Change: 2025-06-10 15:43:22.866961239 +0000
 Birth: 2025-06-10 15:43:22.865889532 +0000
[root@494e02028b21 mnt]# 

I noticed that there’s additional bad behavior with icons in almalinux 10.

Normally (under 9.6 anyhow) if you install a google chrome web app it will also install an icon for the app. In almalinux 10 this behavior is absent.

I haven’t captured any output from it, but I just have a suspicion that that backtick isn’t the end of the issues with xdg-icon-resources

Send

Look here and follow it Reporting Bugs - The CentOS Project

Thanks for that, the discussion will move to https://issues.redhat.com/browse/RHEL-96090