Re: installing an icon to the desktop?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. The xdg-desktop-icon has to be done by the user. I imagine you could put together a user-level service in /usr/share/gnome/autostart/ that runs a script that invokes xdg-desktop-icon, and would re-install the icon each login, and then the user would have to disable it if they ever wanted to be rid of the icon. A pain to be sure.

Isaac Fischer

+1 (210) 775-2890
xwaver@xxxxxxxxx

Facebook LinkedIn Twitter Plaxo
IM: Google Talk/ xwaver@xxxxxxxxx AIM/ xwaver118 Skype/ xwaver118

2011/2/1 Erik Blankinship <erikb@xxxxxxxxxxxxx>
That covers your bases, gives the user an option, and doesn't violate any standards that I can see. If a standard banning Launcher install re-emerges, you won't have to do major surgery to your spec, and it will degrade gracefully.

Does that satisfy any|everyone?

Isaac, thank you very much for your response!

Now I can get rpmbuild to successfully use rpmbuild withÂxdg-desktop-icon in %install... and in the process puts an icon on my desktop (before even installing the rpm!) ÂI am doing something wrong. ÂAny suggestions?

Here is the relevant part of my spec file:

Source1: %{name}.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: Âgettext, python-devel, desktop-file-utils, xdg-utils

...

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
xdg-desktop-icon install --novendor %{SOURCE1}




--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux