Created attachment 1984 correct path to applications .desktop files hi, Window displayed by selecting "open with" does not list applications installed on system. It's because xarchiver search in wrong desktop directories, there is a "/" missing in src/open-with-dlg.c at ligne 178.
Created attachment 1985 Double applications loaded with the patch.
Created attachment 1986 Applications listed correctly
Please see the attachment. I can see applications in the "Open With" dialog on my Xubuntu 8.04. The .desktop files are loaded from /usr/share/applications. Which distro do you have?
I use Archlinux, i just see that XDG_DATA_HOME is defined without trailing "/". I couldn't find in freedesktop basedir specs, if the last "/" must be defined or not... maybe, I should open a ticket on arch bugtracker.
(In reply to comment #4) > I use Archlinux, i just see that XDG_DATA_HOME is defined without trailing "/". Can you please add this line: g_print ("%s\n",filename); AFTER line 178 and post the output here please?
$ xarchiver file.tar.gz /usr/shareapplications /usr/local/shareapplications /usr/share/gdm/applications $ echo $XDG_DATA_DIRS /usr/share:/usr/local/share:/usr/share/gdm/
(In reply to comment #6) > $ xarchiver file.tar.gz > /usr/shareapplications > /usr/local/shareapplications > /usr/share/gdm/applications > > $ echo $XDG_DATA_DIRS > /usr/share:/usr/local/share:/usr/share/gdm/ Ok, it's a Xarchiver bug. Don't open any ticket on arch bugtracker.
ok (In reply to comment #1) > Created an attachment (id=1985) [details] > Double applications loaded with the patch. I didn't see this comment, applications are loaded twice because of double definitions of "/usr/share", one with trailing "/" and other one without it.
(In reply to comment #6) > $ xarchiver file.tar.gz > /usr/shareapplications > /usr/local/shareapplications > /usr/share/gdm/applications > > $ echo $XDG_DATA_DIRS > /usr/share:/usr/local/share:/usr/share/gdm/ I think have to come back on my steps, here (Ubuntu 8.04 and Xubuntu 8.04) I have: gt[xarchiver]$ echo $XDG_DATA_DIRS /usr/local/share/:/usr/share/:/usr/share/gdm/ gt[xarchiver]$ As you can see /usr/share ends with a / so I think the problem lies on Archlinux. Please let me know if it occurs with other distro if you have the chance. Thank you Giuseppe
(In reply to comment #9) > As you can see /usr/share ends with a / so I think the problem lies on > Archlinux. Please let me know if it occurs with other distro if you have the > chance. In Fedora 9 (KDE): $ echo $XDG_DATA_DIRS /usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share At http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html, there is some examples without last "/". If we take another variable name, for example $PATH, I can either set path with the last / or not Maybe you can use g_build_filename() to avoid "/" checking.
(In reply to comment #10) > Maybe you can use g_build_filename() to avoid "/" checking. Yes, thank you. Can you please edit line 178 like the following and tell me if it works so we close this bug? filename = g_build_path ("/",dirname,"applications",NULL); Thanks, Giuseppe
Yes, it works. Thanks.
Fixed in revision 28867.