|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
xdg-desktop-menu Install Locations; why /usr/local/share/ and not /usr/share/?Hi,
(1) I suppose xdg-desktop-menu is designed for 3rd. party app. to install the .desktop file. Which is the preferred directory to install 3rd. party app.'s .desktop file? Should it preferably be /usr/share/applications/? I noted a while ago that /usr/share/applications/ was used. However, xdg-desktop-menu is now installing into /usr/local/share/applications/, probably because /usr/local/share/ exists on the systems. Also, this is from Desktop Menu Spec.: http://standards.freedesktop.org/menu-spec/menu-spec-latest.html Install Locations If an application is intended to be installed by root on a system wide basis then /usr/share is recommended to be used as value for datadir and /etc/xdg is recommended to be used as value for sysconfdir. In case the /usr/share hierarchy is not writable it is recommended to use /usr/local/share as value for datadir instead. XDG Base Directory Specification, though, shows this: http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used. This is what xdg-desktop-menu is doing: If $XDG_DATA_DIRS is NULL, xdg_system_dirs is set to: /usr/local/share/:/usr/share/ The first writable directory is used. So, if /usr/local/share/ is found, it is used, instead of /usr/share/! It turned out that a distribution wanted us to always install the .desktop file into /usr/share/applications/. Why xdg-desktop-menu doesn't appear to follow the Desktop Menu Spec.? Is it because the directory content in /usr/local/share/ can potentially shadow that from /usr/share/? (If so, the .desktop file installed to the user home directory also shadows the system directory and can be very confusing in some cases.) I think I'm choosing to define XDG_DATA_DIRS=/usr/share/:/usr/local/share/ when running xdg-desktop-menu to get it to do what I need to do at this time. I want to be better informed if my action can cause some drawback in the desktop experience!? A few other questions... (2) Any idea why if this directory, /usr/share/desktop-directories/, isn't found on a system, xdg-desktop-menu will not work? Is that just a bug? xdg-desktop-menu: No writable system menu directory found. (3) Is it a possibility to support running xdg-utils during "debian/rules build" time and in %Install section of rpm spec. file? Thank you! -- Daniel Yek. _______________________________________________ xdg mailing list xdg@... http://lists.freedesktop.org/mailman/listinfo/xdg |
|
|
Re: xdg-desktop-menu Install Locations; why /usr/local/share/ and not /usr/share/?On Wednesday 19 August 2009 15:22:42 Daniel Yek wrote:
> This is what xdg-desktop-menu is doing: > If $XDG_DATA_DIRS is NULL, xdg_system_dirs is set to: > /usr/local/share/:/usr/share/ > The first writable directory is used. > > So, if /usr/local/share/ is found, it is used, instead of /usr/share/! > > It turned out that a distribution wanted us to always install the > .desktop file into /usr/share/applications/. The way I think of it is that if you were to download a software package, and compile it and install it yourself for the whole system to use you'd install to /usr/local. On the other hand, distribution-provided software packages (like Red Hat RPMs or Ubuntu .debs) would be installed to /usr as it is part of the distribution and not just a local addon. So a configure script you provide, along with other software installation tools, should default to a prefix of /usr/local if no other prefix is given. Distributions will still need a way to have the package install to /usr (well, install to any given path actually) in order to make the packages. Normally the distribution handles this, but if you use a custom build setup with your software package then you'd need to provide a way to change where a package is installed to, either at configure time or at install time. > Why xdg-desktop-menu doesn't appear to follow the Desktop Menu Spec.? > Is it because the directory content in /usr/local/share/ can potentially > shadow that from /usr/share/? > (If so, the .desktop file installed to the user home directory also > shadows the system directory and can be very confusing in some cases.) Both of these cases are intentional. /usr/local shadows /usr since it is a more specific software package (for the given system at least). Home directory shadows /usr/local since it is yet again more specific (to a specific user now instead of system wide). > I think I'm choosing to define > XDG_DATA_DIRS=/usr/share/:/usr/local/share/ when running > xdg-desktop-menu to get it to do what I need to do at this time. > I want to be better informed if my action can cause some drawback in the > desktop experience!? I'd leave the default alone and make a note in your install files that it is required to set XDG_DATA_DIRS before installing (or, allow the user to provide a prefix and set XDG_DATA_DIRS yourself). But I would not default to using /usr/share/:/usr/local/share/ > A few other questions... > (2) Any idea why if this directory, /usr/share/desktop-directories/, > isn't found on a system, xdg-desktop-menu will not work? Is that just a > bug? xdg-desktop-menu: No writable system menu directory found. Does /usr/local/share/desktop-directories/ exist? The error message means exactly what it says: There is nowhere to put the .desktop files meant to create a system-wide menu entry. > (3) Is it a possibility to support running xdg-utils during > "debian/rules build" time and in %Install section of rpm spec. file? Not sure, you might have to Google this one. Regards, - Michael Pyne _______________________________________________ xdg mailing list xdg@... http://lists.freedesktop.org/mailman/listinfo/xdg |
|
|
Re: xdg-desktop-menu Install Locations; why /usr/local/share/ and not /usr/share/?Michael Pyne wrote: > On Wednesday 19 August 2009 15:22:42 Daniel Yek wrote: > >> This is what xdg-desktop-menu is doing: >> If $XDG_DATA_DIRS is NULL, xdg_system_dirs is set to: >> /usr/local/share/:/usr/share/ >> The first writable directory is used. >> >> So, if /usr/local/share/ is found, it is used, instead of /usr/share/! >> >> It turned out that a distribution wanted us to always install the >> .desktop file into /usr/share/applications/. > > > The way I think of it is that if you were to download a software > package, and > compile it and install it yourself for the whole system to use you'd > install > to /usr/local. > > On the other hand, distribution-provided software packages (like Red > Hat RPMs > or Ubuntu .debs) would be installed to /usr as it is part of the > distribution > and not just a local addon. Right. And the installer/packages built by 3rd. party vendor should install to /opt/. That is software installation directory. Desktop menu installation (xdg-desktop-menu) that I asked about may be a different case from software installation. > So a configure script you provide, along with other software installation > tools, should default to a prefix of /usr/local if no other prefix is > given. For software installation directory, the 3rd. party installer cannot touch /usr/local, which is for locally-built software. Again, for desktop menu installation, it may be a different case than this. > Distributions will still need a way to have the package install to > /usr (well, > install to any given path actually) in order to make the packages. > Normally > the distribution handles this, but if you use a custom build setup > with your > software package then you'd need to provide a way to change where a > package is > installed to, either at configure time or at install time. For configuration time before build, true. Typical .rpm or .deb packages simply install (correctly) without interaction. So, the question is by simply using xdg-desktop-menu, would it install to the correct path? Or how the utility can be used correctly, so that it can install correctly? >> Why xdg-desktop-menu doesn't appear to follow the Desktop Menu Spec.? >> Is it because the directory content in /usr/local/share/ can potentially >> shadow that from /usr/share/? >> (If so, the .desktop file installed to the user home directory also >> shadows the system directory and can be very confusing in some cases.) > > Both of these cases are intentional. /usr/local shadows /usr since it > is a > more specific software package (for the given system at least). Home > directory shadows /usr/local since it is yet again more specific (to a > specific user now instead of system wide). The question here is no longer about software installation directories. It is about what xdg-desktop-menu was intended to do as designed. >> A few other questions... >> (2) Any idea why if this directory, /usr/share/desktop-directories/, >> isn't found on a system, xdg-desktop-menu will not work? Is that just a >> bug? xdg-desktop-menu: No writable system menu directory found. > > Does /usr/local/share/desktop-directories/ exist? The directory doesn't exist on certain distribution/installation. > The error message means > exactly what it says: There is nowhere to put the .desktop files meant to > create a system-wide menu entry. It doesn't install into it though -- the directory remain empty after it installed the .desktop file correctly. It appears more like a script problem to me (although I didn't read into the script much when I debug through it.) This is also an issue of how reliable is xdg-desktop-menu. Software packages should be able to rely on the utility to do the right thing, not to error out during installation. :-) Right? -- Daniel Yek. _______________________________________________ xdg mailing list xdg@... http://lists.freedesktop.org/mailman/listinfo/xdg |
| Free embeddable forum powered by Nabble | Forum Help |