New common extended attribute: user.icon?

Damjan Jovanovic damjan.jov at gmail.com
Tue Dec 7 07:33:04 PST 2010


Hi

The Wine project has a particular requirement: shortcuts created on
the desktop need to be given a custom icon, yet those shortcut can't
be .desktop files [1].

Gnome currently implements custom icons for files using a GVFS
metadata property. KDE probably does it a different way. I haven't
checked XFCE or LXDE. But it seems like a good idea to standardize
this across all the desktops as an extended attribute.

Can we please add the following common extended attribute:
user.icon: the name of the custom icon to use for this file, if any.
Interpreted like the "Icon=..." value in a .desktop file.

Regards
Damjan Jovanovic


[1] Windows has the notion of a per-user desktop and a shared desktop.
On Wine the user desktop is mapped to ~/Desktop, while the shared
desktop is in ~/.wine/drive_c/users/Public/Desktop.

Wine creates .desktop files (with icons) in ~/Desktop when a .lnk
files is created on either of those desktops. Similarly, when a .lnk
file is deleted on either of those desktops, the corresponding
.desktop file is also deleted.

But when an application creates a shortcut on the user's desktop in
~/Desktop directly, the .lnk file is visible to the user as well, and
cannot be renamed or deleted by Wine, because Wine deletes .desktop
files when the application deletes .lnk files so that uninstallation
of the application cleans up shortcuts.

Thus the idea is to make .lnk files in ~/Desktop openable by Wine, and
not generate .desktop files for them. But to look nice they need to be
given icons. There's 2 ways to give a file a custom icon: a custom
thumbnailer, and a custom icon. The thumbnailer DBus interface spec is
dead, and seems like overkill anyway. The custom icon seems easy to
add in practice, easier to coordinate among different desktops,
sufficient for Wine's needs, a similar way to store custom icons
already exists on MacOS, and seems like a good idea generally.


More information about the xdg mailing list