|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
.desktop files of GNOME apps and path to these applicationsHi,
The .desktop file distributed with the evince package (/usr/share/applications/evince.desktop) contains: Exec=evince %U meaning that the user's $PATH is taken into account. In general, taking $PATH into account is recommended, but IMHO, this should not be the case here, because of the following points (related to each other): 1. This .desktop file is a file associated with /usr/bin/evince (distributed in the same package...). 2. Taking the user's $PATH into account may have unexpected effects, such as running a different version of evince which may accept a different set of MIME types, or worse, running an evince program that has a completely different behavior: the user (who may be different from the administrator of the machine and may not know GNOME's evince) may have written a program called "evince" (FYI, this is a French word that means "oust") and installed it in his $HOME/bin directory. 3. In config files, $PATH is generally used when one doesn't know the location of the program, for flexibility, but this is not the case here (see point 1). Here the choice of specifying an executable relative to $PATH should only be a choice made by the user himself. Other packages may be affected by the same problem. Note that this is a followup to bug 488971: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488971 (With xulrunner-1.9-gnome-support, iceweasel announces e.g. xpdf, but actually launches evince.) -- Vincent Lefèvre <vincent@...> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-devel-REQUEST@... with a subject of "unsubscribe". Trouble? Contact listmaster@... |
|
|
Re: .desktop files of GNOME apps and path to these applicationsOn Wed, Jul 09, 2008 at 01:14:25PM +0200, Vincent Lefevre wrote:
|| The .desktop file distributed with the evince package || (/usr/share/applications/evince.desktop) contains: || || Exec=evince %U || || meaning that the user's $PATH is taken into account. In general, || taking $PATH into account is recommended, but IMHO, this should || not be the case here, because of the following points (related || to each other): || || 1. This .desktop file is a file associated with /usr/bin/evince || (distributed in the same package...). NFS-mounted /home could be used on multiple computers, where the same (compatible) evince is installed at different locations. || 2. Taking the user's $PATH into account may have unexpected effects, || such as running a different version of evince which may accept a || different set of MIME types, or worse, running an evince program || that has a completely different behavior: the user (who may be || different from the administrator of the machine and may not know || GNOME's evince) may have written a program called "evince" (FYI, || this is a French word that means "oust") and installed it in his || $HOME/bin directory. A user who is clever enough to extend his PATH should clever enough to find out why his evince script is suddenly being executed. || 3. In config files, $PATH is generally used when one doesn't know || the location of the program, for flexibility, but this is not || the case here (see point 1). PATH is part of the environment. An eminent use of environment is to inform programs of precisely that: their environment, such as where other programs are to be found. Use it, that's what it's for. Not using PATH to locate programs would be an exception to this rule. You don't want exceptions, because it hampers the predictability of the system. || Note that this is a followup to bug 488971: || || http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488971 || || (With xulrunner-1.9-gnome-support, iceweasel announces e.g. xpdf, || but actually launches evince.) That bug is more about firefox not running the helper application that is says it is going to run (by whatever cause). Writing a script with destructive potential and putting it in front in your PATH has a dangerous potential. This can aggravate the impact of #488971, but it is still a bug in firefox or in its neighborhood, not in PATH searching. Ciao. Vincent. -- Vincent Zweije <zweije@...> | "If you're flamed in a group you <http://www.xs4all.nl/~zweije/> | don't read, does anybody get burnt?" [Xhost should be taken out and shot] | -- Paul Tomblin on a.s.r. |
|
|
Re: .desktop files of GNOME apps and path to these applicationsOn Wed, Jul 09, 2008 at 02:46:22PM +0200, Vincent Zweije wrote:
> On Wed, Jul 09, 2008 at 01:14:25PM +0200, Vincent Lefevre wrote: > > || The .desktop file distributed with the evince package > || (/usr/share/applications/evince.desktop) contains: > || > || Exec=evince %U > || > || meaning that the user's $PATH is taken into account. In general, > || taking $PATH into account is recommended, but IMHO, this should > || not be the case here, because of the following points (related > || to each other): > || > || 1. This .desktop file is a file associated with /usr/bin/evince > || (distributed in the same package...). > > NFS-mounted /home could be used on multiple computers, where the same > (compatible) evince is installed at different locations. > ships with GNOME). Regards, -Roberto -- Roberto C. Sánchez http://people.connexer.com/~roberto http://www.connexer.com |
|
|
Re: .desktop files of GNOME apps and path to these applicationsOn Wed, Jul 09, 2008 at 12:01:47PM -0400, Roberto C. Sánchez wrote:
> On Wed, Jul 09, 2008 at 02:46:22PM +0200, Vincent Zweije wrote: > > On Wed, Jul 09, 2008 at 01:14:25PM +0200, Vincent Lefevre wrote: > > > > || The .desktop file distributed with the evince package > > || (/usr/share/applications/evince.desktop) contains: > > || > > || Exec=evince %U > > || > > || meaning that the user's $PATH is taken into account. In general, > > || taking $PATH into account is recommended, but IMHO, this should > > || not be the case here, because of the following points (related > > || to each other): > > || > > || 1. This .desktop file is a file associated with /usr/bin/evince > > || (distributed in the same package...). > > > > NFS-mounted /home could be used on multiple computers, where the same > > (compatible) evince is installed at different locations. > > > This is especially true in the case of an environment with multiple > Linux distros (or even with other operating systems, now that Solaris > ships with GNOME). .desktop files are in /usr/share/applications. This is likely to *not* be shared. Mike -- To UNSUBSCRIBE, email to debian-devel-REQUEST@... with a subject of "unsubscribe". Trouble? Contact listmaster@... |
|
|
Re: .desktop files of GNOME apps and path to these applicationsOn 2008-07-09 14:46:22 +0200, Vincent Zweije wrote:
> On Wed, Jul 09, 2008 at 01:14:25PM +0200, Vincent Lefevre wrote: > || The .desktop file distributed with the evince package > || (/usr/share/applications/evince.desktop) contains: > || > || Exec=evince %U > || > || meaning that the user's $PATH is taken into account. In general, > || taking $PATH into account is recommended, but IMHO, this should > || not be the case here, because of the following points (related > || to each other): > || > || 1. This .desktop file is a file associated with /usr/bin/evince > || (distributed in the same package...). > > NFS-mounted /home could be used on multiple computers, where the same > (compatible) evince is installed at different locations. You didn't read my mail. I'm talking about Debian's evince package, for which evince is installed in /usr/bin. Also, the .desktop file distributed with this package is not in /home, but in /usr/share/applications/. If the .desktop file is there to work also with other evince binaries (installed elsewhere), then it shouldn't be distributed in the evince package, but in a more general package for GNOME support. Indeed, if the evince application is installed somewhere else and the user wants to run this version, then he doesn't need the evince package. > || 3. In config files, $PATH is generally used when one doesn't know > || the location of the program, for flexibility, but this is not > || the case here (see point 1). > > PATH is part of the environment. An eminent use of environment is to > inform programs of precisely that: their environment, such as where > other programs are to be found. Use it, that's what it's for. Again you missed the point: it is useless here since the evince provided by the evince package is in /usr/bin. If the user has an evince installed somewhere else, see the above discussion. > Not using PATH to locate programs would be an exception to this > rule. You don't want exceptions, because it hampers the > predictability of the system. Depending on the environment makes the system less predictable. -- Vincent Lefèvre <vincent@...> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-devel-REQUEST@... with a subject of "unsubscribe". Trouble? Contact listmaster@... |
|
|
Re: .desktop files of GNOME apps and path to these applicationsLe mercredi 09 juillet 2008 à 13:14 +0200, Vincent Lefevre a écrit :
> 3. In config files, $PATH is generally used when one doesn't know > the location of the program, for flexibility, but this is not > the case here (see point 1). > > Here the choice of specifying an executable relative to $PATH should > only be a choice made by the user himself. > > Other packages may be affected by the same problem. This is a valid concern; we are already hardcoding paths for gnome-games because their being in /usr/games is much more often a problem, but I don’t see a good reason for not doing it for other files. I have asked the question on the upstream ML in the hope we can fix this issue directly. Cheers, -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `- our own. Resistance is futile. |
|
|
Re: .desktop files of GNOME apps and path to these applicationsVincent Lefevre wrote:
> Depending on the environment makes the system less predictable. So does accepting input from the keyboard and network. Also, I've found that systems without a regular input of electrons have a much more reliable behavior. -- see shy jo |
|
|
Re: .desktop files of GNOME apps and path to these applicationsI just submitted #492027 with a patch to dh_desktop which will hardcode
the path in most existing desktop files. Cheers, -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `- our own. Resistance is futile. |
| Free Forum Powered by Nabble | Forum Help |