Thanks. Looks like a good solution. How about a case when there is no desktop file? I don't have better idea than displaying an error message.
On Tue, Aug 4, 2009 at 13:28, Mike Mammarella <m...@chromium.org> wrote: > There should also already be a desktop file for Chrome/Chromium on the > system; you might consider using it as a template in order to create > the desktop shortcut. You can find it by searching a set of > directories given by the environment variables $XDG_DATA_HOME and > $XDG_DATA_DIRS, the former defaulting to $HOME/.local/share and the > latter being a colon-separated search path defaulting to > /usr/local/share:/usr/share. Within each directory you'd look for a > subdirectory named "applications" that contains desktop files. (This > info comes from the XDG site.) > > As for the correct name for the desktop file, check out > chrome/browser/shell_integration_linux.cc which has to do this to > figure out whether we are the default browser or not. There is a bit > of an issue when you're running an unpackaged version you just > compiled; in that case, unless you run it with "chrome-wrapper" > instead of just "chrome" there might not be a desktop file at all. > (See chrome/tools/build/linux/chrome-wrapper which is copied alongside > the binary when you compile.) But that's probably OK. > > --Mike > > On Tue, Aug 4, 2009 at 1:22 PM, Paweł Hajdan Jr.<phajdan...@chromium.org> > wrote: > > Yes, but even then we need to know how the launcher is named. Hardcoding > > "google-chrome" is not good for chromium builds (and we are going to have > > Chromium packaged for Gentoo). Having it "chromium" for Chromium is also > not > > good, because of the conflict with Chromium (the game). > > > > On Tue, Aug 4, 2009 at 13:18, Evan Martin <e...@chromium.org> wrote: > >> > >> E.g. this successfully starts xeyes when you click on it. > >> > >> [Desktop Entry] > >> Version=1.0 > >> Encoding=UTF-8 > >> Name=test.txt > >> Type=Application > >> Exec=xeyes > >> Name[en_US]=test.txt > >> > >> > >> On Tue, Aug 4, 2009 at 1:17 PM, Evan Martin<e...@chromium.org> wrote: > >> > Do we need a full path? I think desktop files know to search $PATH > >> > for executables. > >> > > >> > On Tue, Aug 4, 2009 at 1:14 PM, Paweł Hajdan > >> > Jr.<phajdan...@chromium.org> wrote: > >> >> There is one problem with creating desktop shortcuts on Linux: > getting > >> >> correct path to the launcher script. > >> >> Gears find Firefox launcher using > >> >> > >> >> "which": > http://code.google.com/p/gears/source/browse/trunk/gears/desktop/desktop_linux.cc > >> >> Currently Chromium needs the launcher for correct library path to > load > >> >> custom ffmpeg libraries. > >> >> The launcher may be at different locations on different distros. > >> >> Do you have ideas what to do? I was thinking about patching some file > >> >> for > >> >> each distro with the correct path... but it's not the most elegant > >> >> solution. > >> >> >> > >> >> > >> > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---