[Fedora-packaging] installing an icon to the desktop?

Bruce-Robert Pocock brpocock at star-hope.org
Tue Feb 1 23:14:30 UTC 2011


2011/2/1 Isaac Fischer <xwaver at gmail.com>
>
> xdg-desktop-icon can't be done in %install, without putting your .desktop file in ~root/Desktop or whoever is building the package, because it's done at build time. xdg-desktop-icon only works for the current user. The regular user would have to have rights to the RPM database to install even a subpackage with nothing but the Launcher file and macros. So, upon reflection, that's why it can't be done at RPM install - you'd have to have a script which examines /home/* and inserts it into all of them, which is just flat out wrong.


At least for the case of all locally-known users, you could envision
reading the user database with getpwent(3), finding each home folder,
plopping the .desktop file onto the ~/Desktop/ directory, and adding
one to /etc/skel/Desktop/ for future users created locally. But that
doesn't handle things like school or corporate LANs where /home/ (or
the directory structure analogous to /home/…) may not be writeable by
root.

Still not a great idea, but it would work in the most general case.


More information about the packaging mailing list