After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169198 - wrong desktop file used
wrong desktop file used
Status: RESOLVED NOTABUG
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.9.x
Other Linux
: High major
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-04 14:51 UTC by Christian Persch
Modified: 2005-03-05 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase.c (594 bytes, text/plain)
2005-03-04 14:52 UTC, Christian Persch
Details

Description Christian Persch 2005-03-04 14:51:54 UTC
Steps to reproduce:
0) Compile the attached testcase
1) rm -f ~/.local/share/applications/gedit.desktop
2) Associate text/plain files with gedit ("Text Editor") in nautilus
3) run the testcase with an existing file, like so: "./test test.c"
4) Right-click on any file in nautilus, choose "Open with other application"
5) Expand "Use custom command", enter "gedit --new-window" (without quotes)
6) do (3) again

Expected results:
Step 3 and 6 launch gedit, opening the file given as argument.

Actual results:
Step 6 launches gedit with a blank document.

Further analysis reveals that in step 3, the desktop file associated with the
default handler for text/plain is /usr/share/applications/gedit.desktop, while
in step 6 it is ~/.local/share/applications/gedit.desktop, even though you
didn't change the default handler! That desktop file has the Exec line
"Exec=gedit --new-window"; note the absence of %U like in the system
gedit.desktop file.

GNOME-VFS 2.9.92, Nautilus 2.9.92 (ubuntu hoary).
Comment 1 Christian Persch 2005-03-04 14:52:26 UTC
Created attachment 38246 [details]
testcase.c
Comment 2 Marco Pesenti Gritti 2005-03-05 12:02:31 UTC
Per IRC discussion I think this is not a bug. .local should have higher priority
over system and the blank file problem is due to the fact that you are passing a
path instead of an uri to gnome_vfs_application_launch.

Feel free to reopen if you disagree.