FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 02-01-2011, 09:06 PM
Erik Blankinship
 
Default installing an icon to the desktop?

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}.desktopBuildRoot: %{_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@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 02-01-2011, 10:04 PM
Isaac Fischer
 
Default installing an icon to the desktop?

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@gmail.com


IM: xwaver@gmail.com xwaver118 xwaver118


2011/2/1 Erik Blankinship <erikb@mediamods.com>


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}.desktopBuildRoot: %{_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@lists.fedoraproject.org

https://admin.fedoraproject.org/mailman/listinfo/packaging


--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 02-01-2011, 10:14 PM
Bruce-Robert Pocock
 
Default installing an icon to the desktop?

2011/2/1 Isaac Fischer <xwaver@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.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 02-01-2011, 10:25 PM
Michael Thomas
 
Default installing an icon to the desktop?

On 02/01/2011 03:14 PM, Bruce-Robert Pocock wrote:
> 2011/2/1 Isaac Fischer <xwaver@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.

It seems that in order to really make such a mechanism work, you'd need
a system directory (/usr/share/Desktop? or something similar) that
contains additional icons that should be displayed on a user's desktop.
Then when the user's session starts up, the session manager displays
all icons in ~/Desktop as well as the contents of /usr/share/Desktop.
This probably requires making changes to the session manager, however.

Having said this, I still think the idea of packages polluting the
users' desktops is gross.

--Wart
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 02-02-2011, 12:51 AM
Jon Ciesla
 
Default installing an icon to the desktop?

On 02/01/2011 05:04 PM, Isaac Fischer wrote:
> 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.
> *

But that's not a concern because no one's building RPMs as root.

Right?

-J

> *
> *Isaac Fischer*
>
> +1 (210) 775-2890
> xwaver@gmail.com <mailto:xwaver@gmail.com>
>
> Facebook <http://www.facebook.com/xwaver> LinkedIn
> <http://www.linkedin.com/in/ijfischer> Twitter
> <http://twitter.com/xwaver> Plaxo <http://xwaver.myplaxo.com/>
> IM: Google Talk/ xwaver@gmail.com <mailto:xwaver@gmail.com> AIM/
> xwaver118 Skype/ xwaver118
>
> 2011/2/1 Erik Blankinship <erikb@mediamods.com <mailto:erikb@mediamods.com>>
>
> 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@lists.fedoraproject.org
> <mailtoackaging@lists.fedoraproject.org>
> https://admin.fedoraproject.org/mailman/listinfo/packaging
>
>
>
>
> --
> packaging mailing list
> packaging@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/packaging

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

Thread Tools




All times are GMT. The time now is 08:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org